Sha256: 5c8bf977c8a2f93700f042bfdb61560196e0a0f1bd0cd3b751ea8d6fc8f8cafc
Contents?: true
Size: 665 Bytes
Versions: 4
Compression:
Stored size: 665 Bytes
Contents
# This migration comes from alchemy (originally 20140107192720) class AddMissingUniqueIndicesToTagsAndTaggings < ActiveRecord::Migration[4.2] def self.up add_index :tags, :name, unique: true 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: 'taggings_idx' end def self.down remove_index :tags, :name remove_index :taggings, name: 'tagging_idx' add_index :taggings, :tag_id add_index :taggings, [:taggable_id, :taggable_type, :context] end end
Version data entries
4 entries across 4 versions & 1 rubygems