fix: cascade invitation on organization delete
Signed-off-by: manish-singh-bisht <mthefool218@gmail.com> Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
committed by
Bryan Frimin
parent
abbf33c063
commit
0d741c3c85
5
pkg/coredata/migrations/20251205T154956Z.sql
Normal file
5
pkg/coredata/migrations/20251205T154956Z.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
DELETE FROM authz_invitations
|
||||
WHERE organization_id NOT IN (SELECT id FROM organizations);
|
||||
|
||||
ALTER TABLE authz_invitations ADD CONSTRAINT authz_invitations_organization_id_fkey
|
||||
FOREIGN KEY (organization_id) REFERENCES organizations(id) ON DELETE CASCADE;
|
||||
Reference in New Issue
Block a user