mirror of
https://github.com/internetee/registry.git
synced 2025-05-28 08:30:15 +02:00
Story#108602614 - optimize contacts history import
This commit is contained in:
parent
b75b35f554
commit
1fb0259806
6 changed files with 35 additions and 14 deletions
10
db/migrate/20160106101725_version_object_is_jsonb.rb
Normal file
10
db/migrate/20160106101725_version_object_is_jsonb.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
class VersionObjectIsJsonb < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :log_contacts, :object, :jsonb, using: "object::jsonb"
|
||||
execute %q(CREATE INDEX "log_contacts_object_legacy_id" ON "log_contacts"(cast("object"->>'legacy_id' as int)))
|
||||
add_index :registrars, :legacy_id
|
||||
end
|
||||
def down
|
||||
change_column :log_contacts, :object, :json, using: "object::json"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue