mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 03:38:32 +02:00
Change parent_id FK from ON DELETE SET NULL to ON DELETE CASCADE. Deleting a parent comment now deletes all its replies at the DB level. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 lines
199 B
SQL
4 lines
199 B
SQL
ALTER TABLE comment DROP CONSTRAINT IF EXISTS comment_parent_id_fkey;
|
|
ALTER TABLE comment ADD CONSTRAINT comment_parent_id_fkey
|
|
FOREIGN KEY (parent_id) REFERENCES comment(id) ON DELETE SET NULL;
|