mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Fixed migrations and modified object data type of log_domains table
This commit is contained in:
parent
e8fa1711ed
commit
2714c262db
6 changed files with 43 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue