1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 require './db/migrate/20161213172944_full_text_search_indexes'
7 class AddPropertiesToGroups < ActiveRecord::Migration
9 add_column :groups, :properties, :jsonb, default: {}
10 ActiveRecord::Base.connection.execute("CREATE INDEX group_index_on_properties ON groups USING gin (properties);")
11 FullTextSearchIndexes.new.replace_index('groups')
15 ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS group_index_on_properties")
16 remove_column :groups, :properties