Sha256: 9b56a53acc9ef7ec01954c208370031126d402c419c8be9735618be3ff2c0d35

Contents?: true

Size: 495 Bytes

Versions: 7

Compression:

Stored size: 495 Bytes

Contents

if ActiveRecord.gem_version >= Gem::Version.new('5.0')
  class AddMissingTaggableIndex < ActiveRecord::Migration[4.2]; end
else
  class AddMissingTaggableIndex < ActiveRecord::Migration; end
end
AddMissingTaggableIndex.class_eval do
  def self.up
    add_index ActsAsTaggableOn.taggings_table, [:taggable_id, :taggable_type, :context], name: 'taggings_taggable_context_idx'
  end

  def self.down
    remove_index ActsAsTaggableOn.taggings_table, name: 'taggings_taggable_context_idx'
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
acts-as-taggable-on-fix-8.1.1 db/migrate/4_add_missing_taggable_index.rb
acts-as-taggable-on-fix-8.1.0 db/migrate/4_add_missing_taggable_index.rb
acts-as-taggable-on-8.1.0 db/migrate/4_add_missing_taggable_index.rb
acts-as-taggable-on-8.0.0 db/migrate/4_add_missing_taggable_index.rb
acts-as-taggable-on-7.0.0 db/migrate/4_add_missing_taggable_index.rb
acts-as-taggable-on-6.5.0 db/migrate/4_add_missing_taggable_index.rb
sb-acts-as-taggable-on-6.5.0 db/migrate/4_add_missing_taggable_index.rb