From fb006dbe19868b52af958d2cdd93c3de14dd00ae Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Wed, 29 Oct 2025 20:16:00 +0100 Subject: [PATCH] Fix missing fk Signed-off-by: Bryan Frimin --- pkg/coredata/migrations/20251018T194142Z.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/coredata/migrations/20251018T194142Z.sql b/pkg/coredata/migrations/20251018T194142Z.sql index 97828ca3c..0b2c30b1c 100644 --- a/pkg/coredata/migrations/20251018T194142Z.sql +++ b/pkg/coredata/migrations/20251018T194142Z.sql @@ -58,7 +58,10 @@ CREATE TABLE auth_saml_assertions ( tenant_id TEXT NOT NULL, organization_id TEXT NOT NULL, used_at TIMESTAMP NOT NULL, - expires_at TIMESTAMP NOT NULL + expires_at TIMESTAMP NOT NULL, + + CONSTRAINT fk_auth_saml_assertions_organization FOREIGN KEY (organization_id) + REFERENCES organizations(id) ON DELETE CASCADE ); CREATE INDEX idx_auth_saml_assertions_expires_at