RBOnRails-learning/db/migrate/20240807121058_create_comments.rb
2024-08-07 16:43:33 +02:00

12 lines
242 B
Ruby

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