Skip to content

Conversation

@ok-developer
Copy link

@ok-developer ok-developer commented Nov 14, 2025

Issue #9037 requires manipulation with settings only once after app upgrade. I noticed that config migration already exists, but it makes only backward move. In this PR was added forward migration possibility for accounts part of config.

It uses version key which already exists in accounts configuration file, so it's just needed to be used in forward way. Every change in config layout could be controlled in AccountManager::migrateToActualVersion() function.
Backward migration remained unchanged.

How it works?
Firstly it checks app version string from config. If it was changed, app decides is it upgrade or downgrade. If it's upgrade it checks and perform possible migration actions to higher version of config details. If it's downgrade and config versions are not max, than it will be ignoring or erasing some keys(as it was earlier). Before any change it backups config file and, if enabled, shows warning message.

To resolve the main issue was added checks for networkUploadLimitSetting and networkDownloadLimitSetting keys in account v14 migration rule.

- added forward migration possibility to Application::configVersionMigration();
- added version abstruction for accounts and each account settings;
- added version 14 to account settings:
  - forcly removes buggy up/down network limits(nextcloud#9037).

Signed-off-by: Oleksandr Khryshchuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant