Class: CreatePagesTags
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreatePagesTags
- Defined in:
- lib/generators/cms/templates/migrations/create_pages_tags.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/generators/cms/templates/migrations/create_pages_tags.rb', line 2 def change create_table :pages_tags, id: false do |t| t.references :page t.references :tag end add_index :pages_tags, :page_id add_index :pages_tags, :tag_id end |