From 5971bfbfa66ecfebf2b1c08d34fcbd8c18cdc046 Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Sun, 24 Aug 2025 15:05:20 +0200 Subject: [PATCH] fix: migration clears allowed users groups --- .../sqlite/20250822000000_foreign_keys_improvements.up.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/resources/migrations/sqlite/20250822000000_foreign_keys_improvements.up.sql b/backend/resources/migrations/sqlite/20250822000000_foreign_keys_improvements.up.sql index 27428113..532130b6 100644 --- a/backend/resources/migrations/sqlite/20250822000000_foreign_keys_improvements.up.sql +++ b/backend/resources/migrations/sqlite/20250822000000_foreign_keys_improvements.up.sql @@ -1,3 +1,4 @@ +PRAGMA foreign_keys=OFF; --------------------------- -- Delete all orphaned rows --------------------------- @@ -170,4 +171,7 @@ SELECT id, created_at, name, credential_id, public_key, attestation_type, transport, user_id, backup_eligible, backup_state FROM webauthn_credentials; DROP TABLE webauthn_credentials; -ALTER TABLE webauthn_credentials_new RENAME TO webauthn_credentials; \ No newline at end of file +ALTER TABLE webauthn_credentials_new RENAME TO webauthn_credentials; + +PRAGMA foreign_keys=ON; +PRAGMA foreign_key_check; \ No newline at end of file