aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db/migrate/094_remove_old_tags_foreign_key.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/db/migrate/094_remove_old_tags_foreign_key.rb b/db/migrate/094_remove_old_tags_foreign_key.rb
index 839f76334..5a6a00acc 100644
--- a/db/migrate/094_remove_old_tags_foreign_key.rb
+++ b/db/migrate/094_remove_old_tags_foreign_key.rb
@@ -2,12 +2,10 @@ class RemoveOldTagsForeignKey < ActiveRecord::Migration
def self.up
if ActiveRecord::Base.connection.adapter_name == "PostgreSQL"
execute "ALTER TABLE has_tag_string_tags DROP CONSTRAINT fk_public_body_tags_public_body"
+ execute 'DROP INDEX index_public_body_tags_on_public_body_id_and_name_and_value'
+ execute 'DROP INDEX index_public_body_tags_on_name'
end
- # 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], :name => 'by_model_and_model_id_and_name_and_value'
add_index :has_tag_string_tags, :name
end