vereto-api/db/migrate/20180222154430_create_comments.rb

12 lines
250 B
Ruby
Raw Permalink Normal View History

2018-02-27 14:54:19 +00:00
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