From 835af696703484208882a70cc5dd47c5838ecf58 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 12 Oct 2023 17:10:34 -0400 Subject: Added blog post commenting --- db/migrate/20231012190529_create_comments.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 db/migrate/20231012190529_create_comments.rb (limited to 'db/migrate') diff --git a/db/migrate/20231012190529_create_comments.rb b/db/migrate/20231012190529_create_comments.rb new file mode 100644 index 0000000..3073dd5 --- /dev/null +++ b/db/migrate/20231012190529_create_comments.rb @@ -0,0 +1,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 -- cgit 1.4.1