Sha256: 014e5055ba45c5bc2692414bb0798b7fca73f52a6d40f1ecd8137d56a62600ab

Contents?: true

Size: 476 Bytes

Versions: 8

Compression:

Stored size: 476 Bytes

Contents

class AlterTaggableIdToString < ActiveRecord::Migration
  def self.up
    remove_index :taggings, [:taggable_id, :taggable_type, :context]
    change_column :taggings, :taggable_id, :string
    add_index :taggings, [:taggable_id, :taggable_type, :context]
  end

  def self.down
    remove_index :taggings, [:taggable_id, :taggable_type, :context]
    change_column :taggings, :taggable_id, :integer
    add_index :taggings, [:taggable_id, :taggable_type, :context]
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
blacklight_user_generated_content-0.0.8 lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb
blacklight_user_generated_content-0.0.7 lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb
blacklight_user_generated_content-0.0.6 lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb
blacklight_user_generated_content-0.0.5 lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb
blacklight_user_generated_content-0.0.4 lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb
blacklight_user_generated_content-0.0.3 lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb
blacklight_user_generated_content-0.0.2 lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb
blacklight_user_generated_content-0.0.1 lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb