internetee-registry/db/migrate/20221214074252_add_index_to_log_domain_object.rb

11 lines
295 B
Ruby

class AddIndexToLogDomainObject < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def up
enable_extension 'btree_gin'
add_index :log_domains, :object, using: :gin, algorithm: :concurrently, if_not_exists: true
end
def down
remove_index :log_domains, :object
end
end