From fce622b5b1959892b6f6ea94bfe3a1c4eb52d8dd Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 14 Oct 2023 11:12:05 -0400 Subject: Added comment replying --- db/migrate/20231014141657_add_reply_to_comment.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 db/migrate/20231014141657_add_reply_to_comment.rb (limited to 'db/migrate') diff --git a/db/migrate/20231014141657_add_reply_to_comment.rb b/db/migrate/20231014141657_add_reply_to_comment.rb new file mode 100644 index 0000000..8e7b445 --- /dev/null +++ b/db/migrate/20231014141657_add_reply_to_comment.rb @@ -0,0 +1,5 @@ +class AddReplyToComment < ActiveRecord::Migration[7.0] + def change + add_reference :comments, :reply_to, foreign_key: { to_table: :comments } + end +end -- cgit 1.4.1