db: migrate user profiles

This commit is contained in:
Harvey Tindall
2023-06-24 21:29:16 +01:00
parent 63948a6de0
commit a735e4ff29
7 changed files with 105 additions and 61 deletions

View File

@@ -236,6 +236,11 @@ func migrateToBadger(app *appContext) {
for k, v := range app.storage.deprecatedUserExpiries {
app.storage.SetUserExpiryKey(k, UserExpiry{Expiry: v})
}
app.storage.loadProfiles()
for k, v := range app.storage.profiles {
app.storage.SetProfileKey(k, v)
}
}
// Migrate between hyphenated & non-hyphenated user IDs. Doesn't seem to happen anymore, so disabled.