diff options
Diffstat (limited to 'db/migrate/20231014141657_add_reply_to_comment.rb')
-rw-r--r-- | db/migrate/20231014141657_add_reply_to_comment.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ | |||
1 | class AddReplyToComment < ActiveRecord::Migration[7.0] | ||
2 | def change | ||
3 | add_reference :comments, :reply_to, foreign_key: { to_table: :comments } | ||
4 | end | ||
5 | end | ||