You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
migrateSchema st migrations confirmMigrations vacuum =do
53
53
Migrations.initialize st
54
54
get st migrations >>=\case
55
55
Left e ->do
56
56
when (confirmMigrations ==MCConsole) $ confirmOrExit ("Database state error: "<> mtrErrorDescription e)
57
57
pure.Left$MigrationError e
58
58
RightMTRNone->pure$Right()
59
59
Right ms@(MTRUp ums)
60
-
| dbNew st ->Migrations.run st ms $>Right()
60
+
| dbNew st ->Migrations.run st vacuum ms $>Right()
61
61
|otherwise->case confirmMigrations of
62
-
MCYesUp-> runWithBackup st ms
63
-
MCYesUpDown-> runWithBackup st ms
64
-
MCConsole-> confirm err >> runWithBackup st ms
62
+
MCYesUp-> runWithBackup st vacuum ms
63
+
MCYesUpDown-> runWithBackup st vacuum ms
64
+
MCConsole-> confirm err >> runWithBackup st vacuum ms
65
65
MCError->pure$Left err
66
66
where
67
67
err =MEUpgrade$map upMigration ums -- "The app has a newer version than the database.\nConfirm to back up and upgrade using these migrations: " <> intercalate ", " (map name ums)
68
68
Right ms@(MTRDown dms) ->case confirmMigrations of
69
-
MCYesUpDown-> runWithBackup st ms
70
-
MCConsole-> confirm err >> runWithBackup st ms
69
+
MCYesUpDown-> runWithBackup st vacuum ms
70
+
MCConsole-> confirm err >> runWithBackup st vacuum ms
0 commit comments