Fixed migrations and modified object data type of log_domains table

This commit is contained in:
Sergei Tsoganov 2022-12-14 09:56:26 +02:00
parent e8fa1711ed
commit 2714c262db
6 changed files with 43 additions and 13 deletions

View file

@ -2,14 +2,14 @@ class AddIndexesToLogDomains < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def up
enable_extension 'btree_gin'
add_index :log_domains, :event, algorithm: :concurrently
add_index :log_domains, :object, using: :gin, algorithm: :concurrently
add_index :log_domains, :object_changes, using: :gin, algorithm: :concurrently
add_index :log_domains, :event, algorithm: :concurrently, if_not_exists: true
# add_index :log_domains, :object, using: :gin, algorithm: :concurrently, if_not_exists: true
add_index :log_domains, :object_changes, using: :gin, algorithm: :concurrently, if_not_exists: true
end
def down
remove_index :log_domains, :event
remove_index :log_domains, :object
# remove_index :log_domains, :object
remove_index :log_domains, :object_changes
end
end