Skip to content

Commit 13ba25b

Browse files
committed
Unset password for system user
1 parent b02f8bf commit 13ba25b

File tree

1 file changed

+7
-0
lines changed
  • wizard-server/src/Wizard/Database/Migration/Production/Migration_0053_qtnEventsRefactoring

1 file changed

+7
-0
lines changed

wizard-server/src/Wizard/Database/Migration/Production/Migration_0053_qtnEventsRefactoring/Migration.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ migrate dbPool = do
2121
testEventCount dbPool
2222
testValueCount dbPool
2323
removeEventsColumnFromQuestionnaire dbPool
24+
changePasswordHashForSystemUser dbPool
2425
createExternalLinkTable dbPool
2526

2627
regenerateQuestionnaireEventUuid dbPool = do
@@ -322,6 +323,12 @@ removeEventsColumnFromQuestionnaire dbPool = do
322323
liftIO $ withResource dbPool action
323324
return Nothing
324325

326+
changePasswordHashForSystemUser dbPool = do
327+
let sql = "UPDATE user_entity SET password_hash = 'no-hash' WHERE uuid = '00000000-0000-0000-0000-000000000000' AND tenant_uuid = '00000000-0000-0000-0000-000000000000';"
328+
let action conn = execute_ conn sql
329+
liftIO $ withResource dbPool action
330+
return Nothing
331+
325332
createExternalLinkTable dbPool = do
326333
let sql =
327334
"CREATE TABLE external_link_usage \

0 commit comments

Comments
 (0)