Refactor more migration functions
This commit is contained in:
parent
67a7576e24
commit
4178a582e8
1 changed files with 4 additions and 24 deletions
|
@ -120,30 +120,10 @@ var (
|
||||||
migrate(moveGroups, "groups table")
|
migrate(moveGroups, "groups table")
|
||||||
migrate(moveGroupCredentials, "group credentials table")
|
migrate(moveGroupCredentials, "group credentials table")
|
||||||
migrate(moveContacts, "contacts table")
|
migrate(moveContacts, "contacts table")
|
||||||
|
migrate(moveProfileKeys, "profile keys table")
|
||||||
if err := moveProfileKeys(source, dest); err != nil {
|
migrate(moveProfiles, "profiles tables")
|
||||||
log.Println("error moving profile keys table")
|
migrate(moveProfileCapabilities, "profile capabilities tables")
|
||||||
return err
|
migrate(moveProfileBadges, "profile badges tables")
|
||||||
}
|
|
||||||
log.Println("moved profile keys table")
|
|
||||||
|
|
||||||
if err := moveProfiles(source, dest); err != nil {
|
|
||||||
log.Println("error moving profiles tables")
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
log.Println("moved profiles tables")
|
|
||||||
|
|
||||||
if err := moveProfileCapabilities(source, dest); err != nil {
|
|
||||||
log.Println("error moving profile capabilities tables")
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
log.Println("moved profile capabilities tables")
|
|
||||||
|
|
||||||
if err := moveProfileBadges(source, dest); err != nil {
|
|
||||||
log.Println("error moving profile badges tables")
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
log.Println("moved profile badges tables")
|
|
||||||
|
|
||||||
if err := os.Remove(sqlitePath); err != nil {
|
if err := os.Remove(sqlitePath); err != nil {
|
||||||
log.Println("error deleting sqlite file")
|
log.Println("error deleting sqlite file")
|
||||||
|
|
Loading…
Reference in a new issue