Class: AlterTaggableIdToString
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AlterTaggableIdToString
- Defined in:
- lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
8 9 10 11 12 |
# File 'lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb', line 8 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 |
.up ⇒ Object
2 3 4 5 6 |
# File 'lib/generators/blacklight_user_generated_content/templates/alter_taggable_id_to_string.rb', line 2 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 |