Class: CreatePosts
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreatePosts
- Defined in:
- lib/generators/cms/templates/migrations/create_posts.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 |
# File 'lib/generators/cms/templates/migrations/create_posts.rb', line 2 def change create_table :posts do |t| t.belongs_to :page, index: true t.belongs_to :user, index: true end end |