Skip to content

Commit

Permalink
Format new migration so easier to read
Browse files Browse the repository at this point in the history
  • Loading branch information
bf4 committed Dec 10, 2013
1 parent 5056da4 commit f1a86b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/migrate/2_add_missing_unique_indices.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ def self.up

remove_index :taggings, :tag_id
remove_index :taggings, [:taggable_id, :taggable_type, :context]
add_index :taggings, [:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type], unique: true, name: 'tagging_idx'
add_index :taggings,
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
unique: true, name: 'taggings_idx'
end

def self.down
Expand Down

0 comments on commit f1a86b5

Please sign in to comment.