aboutsummaryrefslogtreecommitdiff
path: root/db/migrate/20240224165311_create_comments.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20240224165311_create_comments.rb')
-rw-r--r--db/migrate/20240224165311_create_comments.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20240224165311_create_comments.rb b/db/migrate/20240224165311_create_comments.rb
new file mode 100644
index 0000000..49cb989
--- /dev/null
+++ b/db/migrate/20240224165311_create_comments.rb
@@ -0,0 +1,10 @@
+class CreateComments < ActiveRecord::Migration[7.1]
+ def change
+ create_table :comments do |t|
+ t.references :thing, null: false, foreign_key: true
+ t.text :content
+
+ t.timestamps
+ end
+ end
+end