diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-01-22 16:38:34 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-01-22 16:38:34 +0000 |
commit | a8f2ba358fe0084dc6d41e77bead867c403957e2 (patch) | |
tree | b741de605727235aea498077e2b55184fcd4bd33 | |
parent | c4551ae02edd3886e9892d203dcea9925e51dc00 (diff) | |
parent | e11acad45d13024c396b679b866e761417079232 (diff) |
Merge branch 'feature/db-migration-rails-3-prep' into develop
-rw-r--r-- | db/migrate/094_remove_old_tags_foreign_key.rb | 7 |
1 files changed, 3 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 1a87b97c2..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,11 @@ 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 - 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 |