diff options
-rw-r--r-- | db/migrate/094_remove_old_tags_foreign_key.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/db/migrate/094_remove_old_tags_foreign_key.rb b/db/migrate/094_remove_old_tags_foreign_key.rb index 1a87b97c2..839f76334 100644 --- a/db/migrate/094_remove_old_tags_foreign_key.rb +++ b/db/migrate/094_remove_old_tags_foreign_key.rb @@ -4,10 +4,11 @@ class RemoveOldTagsForeignKey < ActiveRecord::Migration execute "ALTER TABLE has_tag_string_tags DROP CONSTRAINT fk_public_body_tags_public_body" end - remove_index :public_body_tags, [:public_body_id, :name, :value] - remove_index :public_body_tags, :name + # This table was already removed in the previous migration + # remove_index :public_body_tags, [:public_body_id, :name, :value] + # remove_index :public_body_tags, :name - add_index :has_tag_string_tags, [:model, :model_id, :name, :value] + add_index :has_tag_string_tags, [:model, :model_id, :name, :value], :name => 'by_model_and_model_id_and_name_and_value' add_index :has_tag_string_tags, :name end |