chore(migration): fix oauth2 migration contd

This commit is contained in:
Sarah Vaupel 2024-03-13 12:24:25 +01:00
parent 770c2f3182
commit 6b82c26268

View File

@ -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";
|]