[ARVADOS] updated: ebc65675cecdf25ca11a86f789bfb23b600875b8
Git user
git at public.curoverse.com
Tue Jul 11 11:15:05 EDT 2017
Summary of changes:
services/api/db/migrate/20170706141334_json_collection_properties.rb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
via ebc65675cecdf25ca11a86f789bfb23b600875b8 (commit)
via b4dd6bcd832b7c5e9a00e9c0681519a4fb18e45f (commit)
from bb821d03eb10ddcc7822fac51a565d1a11082ebc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit ebc65675cecdf25ca11a86f789bfb23b600875b8
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Jul 11 11:14:01 2017 -0400
11908: Add comment about dropping/recreating FT index.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curoverse.com>
diff --git a/services/api/db/migrate/20170706141334_json_collection_properties.rb b/services/api/db/migrate/20170706141334_json_collection_properties.rb
index 55ab0df..003e5fb 100644
--- a/services/api/db/migrate/20170706141334_json_collection_properties.rb
+++ b/services/api/db/migrate/20170706141334_json_collection_properties.rb
@@ -2,6 +2,9 @@ require './db/migrate/20161213172944_full_text_search_indexes'
class JsonCollectionProperties < ActiveRecord::Migration
def up
+ # Drop the FT index before changing column type to avoid
+ # "PG::DatatypeMismatch: ERROR: COALESCE types jsonb and text
+ # cannot be matched".
ActiveRecord::Base.connection.execute 'DROP INDEX IF EXISTS collections_full_text_search_idx'
ActiveRecord::Base.connection.execute 'ALTER TABLE collections ALTER COLUMN properties TYPE jsonb USING properties::jsonb'
FullTextSearchIndexes.new.replace_index('collections')
commit b4dd6bcd832b7c5e9a00e9c0681519a4fb18e45f
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Jul 11 10:25:16 2017 -0400
11908: Fix crash if index being deleted is already deleted.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curoverse.com>
diff --git a/services/api/db/migrate/20170706141334_json_collection_properties.rb b/services/api/db/migrate/20170706141334_json_collection_properties.rb
index 35ee7ea..55ab0df 100644
--- a/services/api/db/migrate/20170706141334_json_collection_properties.rb
+++ b/services/api/db/migrate/20170706141334_json_collection_properties.rb
@@ -2,7 +2,7 @@ require './db/migrate/20161213172944_full_text_search_indexes'
class JsonCollectionProperties < ActiveRecord::Migration
def up
- ActiveRecord::Base.connection.execute 'DROP INDEX collections_full_text_search_idx'
+ ActiveRecord::Base.connection.execute 'DROP INDEX IF EXISTS collections_full_text_search_idx'
ActiveRecord::Base.connection.execute 'ALTER TABLE collections ALTER COLUMN properties TYPE jsonb USING properties::jsonb'
FullTextSearchIndexes.new.replace_index('collections')
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list