vereto-api/db/migrate/20180222154430_create_comments.rb
2018-02-27 14:54:19 +00:00

11 lines
250 B
Ruby

class CreateComments < ActiveRecord::Migration[5.1]
def change
create_table :comments do |t|
t.text :content
t.references :article, foreign_key: true
t.references :user, foreign_key: true
t.timestamps
end
end
end