Class: CreateSimpleHashtagHashtaggings
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateSimpleHashtagHashtaggings
- Defined in:
- lib/generators/simple_hashtag/templates/migrations/create_hashtaggings_migration.rb
Overview
This migration comes from simple_hashtag
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/generators/simple_hashtag/templates/migrations/create_hashtaggings_migration.rb', line 3 def change create_table :simple_hashtag_hashtaggings do |t| t.references :hashtag, :index => true t.references :hashtaggable, :polymorphic => true end add_index :simple_hashtag_hashtaggings, ["hashtaggable_id", "hashtaggable_type"], :name => 'index_hashtaggings_hashtaggable_id_hashtaggable_type' end |