From 6b82c26268edd516bb1ccc146626dcf7ff51c3d1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 13 Mar 2024 12:24:25 +0100 Subject: [PATCH] chore(migration): fix oauth2 migration contd --- src/Model/Migration/Definitions.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Migration/Definitions.hs b/src/Model/Migration/Definitions.hs index 063bc985c..662178fa1 100644 --- a/src/Model/Migration/Definitions.hs +++ b/src/Model/Migration/Definitions.hs @@ -178,7 +178,7 @@ customMigrations = mapF $ \case ; |] - Migration20240312OAuth2 -> whenM (andM [ columnNotExists "user" "password_hash", columnExists "user" "authentication", columnExists "user" "last_ldap_synchronisation", columnExists "user" "ldap_primary_key" ]) $ do + Migration20240312OAuth2 -> whenM (andM [ columnNotExists "user" "password_hash", columnExists "user" "authentication", columnExists "user" "last_ldap_synchronisation", columnNotExists "user" "last_sync", columnExists "user" "ldap_primary_key" ]) $ do [executeQQ| ALTER TABLE "user" ADD COLUMN "password_hash" VARCHAR NULL; |] @@ -191,7 +191,7 @@ customMigrations = mapF $ \case |] [executeQQ| - ALTER TABLE "user" RENAME COLUMN "last_ldap_synchronisation" TO "password_hash"; + ALTER TABLE "user" RENAME COLUMN "last_ldap_synchronisation" TO "last_sync"; ALTER TABLE "user" DROP COLUMN "ldap_primary_key"; |]