about summary refs log tree commit diff stats
path: root/db/migrate/20231012190529_create_comments.rb
blob: 3073dd5fa7a6676f1d850f0aa0ec2bb0c134f214 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class CreateComments < ActiveRecord::Migration[7.0]
  def change
    create_table :comments do |t|
      t.references :blog, null: false, foreign_key: true
      t.string :username
      t.string :email
      t.string :website
      t.text :body
      t.string :status
      t.datetime :published_at

      t.timestamps
    end
  end
end