Files
sorsfonalak/crates/db/migrations/0042_forum_reply_to.sql
T

5 lines
305 B
SQL
Raw Normal View History

-- Replies stay two levels deep (a reply to a reply goes under the same
-- first-level post, `parent_id`); `reply_to_id` keeps which post it answered,
-- so the page can say whom it is for ("↪ Holdfény").
ALTER TABLE forum.posts ADD COLUMN reply_to_id bigint REFERENCES forum.posts ON DELETE SET NULL;