12 lines
250 B
Ruby
12 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
|