diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-12 17:10:34 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-12 17:10:34 -0400 |
commit | 835af696703484208882a70cc5dd47c5838ecf58 (patch) | |
tree | 8174d5b8c6f2486da56569bad361dd10aa1183f8 /db/migrate | |
parent | b24e6f58a525fc576e23ef9d498745e64c16cd6c (diff) | |
download | thoughts-835af696703484208882a70cc5dd47c5838ecf58.tar.gz thoughts-835af696703484208882a70cc5dd47c5838ecf58.tar.bz2 thoughts-835af696703484208882a70cc5dd47c5838ecf58.zip |
Added blog post commenting
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 | ||