1
0
Fork 0

Explicit convert migrate snapshot DB to WAL mode

master
Philip O'Toole 8 months ago
parent cc4dd1067c
commit cce70a0bd4

@ -125,6 +125,11 @@ func Upgrade(old, new string, logger *log.Logger) (retErr error) {
if !db.IsValidSQLiteFile(newSqlitePath) {
return fmt.Errorf("migrated SQLite file %s is not valid", newSqlitePath)
}
// Convert to WAL mode.
if openCloseDB(newSqlitePath) != nil {
return fmt.Errorf("failed to convert migrated SQLite file %s to WAL mode", newSqlitePath)
}
return nil
}(); err != nil {
return err

Loading…
Cancel
Save