class CreatePosts
Public Instance Methods
change()
click to toggle source
# File lib/metova/dummy/db/migrate/20141215051632_create_posts.rb, line 2 def change create_table :posts do |t| t.references :user, index: true t.string :title t.string :body t.timestamps null: false end add_foreign_key :posts, :users end