diff --git a/db/migrate/045_remove_user_from_taggings.rb b/db/migrate/045_remove_user_from_taggings.rb index dec44876..0c23bec3 100644 --- a/db/migrate/045_remove_user_from_taggings.rb +++ b/db/migrate/045_remove_user_from_taggings.rb @@ -1,9 +1,18 @@ class RemoveUserFromTaggings < ActiveRecord::Migration def self.up + remove_index :taggings, [:tag_id, :taggable_id, :taggable_type] + remove_index :tags, :name remove_column :taggings, :user_id + add_index :tags, :name + add_index :taggings, [:tag_id, :taggable_id, :taggable_type] end def self.down + remove_index :taggings, [:tag_id, :taggable_id, :taggable_type] + remove_index :tags, :name add_column :taggings, :user_id, :integer + add_index :tags, :name + add_index :taggings, [:tag_id, :taggable_id, :taggable_type] end -end \ No newline at end of file + +end