hello-learning/blog/db/migrate/20181007225337_create_comments.rb
2019-08-06 22:50:19 -05:00

11 lines
229 B
Ruby

class CreateComments < ActiveRecord::Migration[5.2]
def change
create_table :comments do |t|
t.string :commenter
t.text :body
t.references :article, foreign_key: true
t.timestamps
end
end
end