rails-refresher/db/migrate/20240704183304_create_comments.rb

12 lines
242 B
Ruby
Raw Normal View History

2024-07-05 01:00:08 +00:00
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