Sha256: 6d9eadc92ed4befb87152cc6175ff68f47f1f0631e24050ea51376de9d5d9a2d

Contents?: true

Size: 829 Bytes

Versions: 3

Compression:

Stored size: 829 Bytes

Contents

# This migration comes from make_taggable_engine (originally 5)
class AddIndexToTaggings < ActiveRecord::Migration[5.2]
  def change
    add_index MakeTaggable.taggings_table, :taggable_id
    add_index MakeTaggable.taggings_table, :tagger_id
    add_index MakeTaggable.taggings_table, :taggable_type
    add_index MakeTaggable.taggings_table, :context
    add_index MakeTaggable.taggings_table, [:tagger_id, :tagger_type]
    add_index MakeTaggable.taggings_table, [:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type], unique: true, name: "taggings_idx"
    add_index MakeTaggable.taggings_table, [:taggable_id, :taggable_type, :context], name: "taggings_taggable_context_idx"
    add_index MakeTaggable.taggings_table, [:taggable_id, :taggable_type, :tagger_id, :context], name: "taggings_idy"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
make_taggable-0.6.6 spec/dummy/db/migrate/20201121222011_add_index_to_taggings.make_taggable_engine.rb
make_taggable-0.6.5 spec/dummy/db/migrate/20201121222011_add_index_to_taggings.make_taggable_engine.rb
make_taggable-0.6.4 spec/dummy/db/migrate/20201121222011_add_index_to_taggings.make_taggable_engine.rb