diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20231012190529_create_comments.rb | 15 |
1 files changed, 15 insertions, 0 deletions
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 @@ | |||
1 | class CreateComments < ActiveRecord::Migration[7.0] | ||
2 | def change | ||
3 | create_table :comments do |t| | ||
4 | t.references :blog, null: false, foreign_key: true | ||
5 | t.string :username | ||
6 | t.string :email | ||
7 | t.string :website | ||
8 | t.text :body | ||
9 | t.string :status | ||
10 | t.datetime :published_at | ||
11 | |||
12 | t.timestamps | ||
13 | end | ||
14 | end | ||
15 | end | ||