Rename movies to groups in menu items in 65 post-migration (#5247)

* Only backup config file if needed in 58 migration
* Change movies to groups in menu items in 65 post-migration
This commit is contained in:
WithoutPants
2024-09-11 13:39:46 +10:00
committed by GitHub
parent 129dd0ffcc
commit d1c207e40b
2 changed files with 94 additions and 1 deletions

View File

@@ -129,6 +129,12 @@ func (m *schema58Migrator) migrateConfig() error {
return nil
}
ui := c.GetUIConfiguration()
if len(ui) == 0 {
// no UI config to migrate
return nil
}
// save a backup of the original config file
backupPath := fmt.Sprintf("%s.57.%s", orgPath, time.Now().Format("20060102_150405"))
@@ -143,7 +149,6 @@ func (m *schema58Migrator) migrateConfig() error {
}
// migrate the plugin and UI configs from snake_case to camelCase
ui := c.GetUIConfiguration()
if ui != nil {
ui = m.fromSnakeCaseMap(ui)