Decouple project deletion from thread deletion (#4673)

* Decouple project deletion from thread deletion

* Allow a thread to exist without a project

* attempt 2

* Modify migration to set orphaned threads' mods to NULL instead of removing constraint entirely

* Use mod PAT for mod threads
This commit is contained in:
aecsocket
2025-10-31 12:04:01 -07:00
committed by GitHub
parent 4c1020d2ba
commit b7f0988399
3 changed files with 49 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
ALTER TABLE threads
DROP CONSTRAINT threads_mod_id_fkey,
ADD CONSTRAINT threads_mod_id_fkey
FOREIGN KEY (mod_id) REFERENCES mods(id)
ON DELETE SET NULL;