Diffusion Elisa 977c002b6f43

Standardize the database upgrade mechanism

Authored by jguidon on Dec 5 2019, 10:06 PM.

Description

Standardize the database upgrade mechanism

Summary:
This patch is aim to standardize the upgrade mechanism which is currently in the method DatabaseInterface::initDatabase.
The idea is to avoid taking care about the upgrade logic when creating new versions.

On a new version XX, the steps would be the following:

1-create the method DatabaseInterface::upgradeDatabaseVXX
2-add the version to the enum DatabaseInterface::DatabaseVersion
3-add upgradeDatabaseVXX to the switch-cas in callUpgradeFunctionForVersion

Added mechanism for upgrade the database
Add integration for versions V9 -> V14
Added drop request for the unused tables

Reviewers: Elisa, mgallien, ngraham, astippich

Reviewed By: Elisa, mgallien

Differential Revision: https://phabricator.kde.org/D24563

Details

Committed
ngrahamDec 5 2019, 10:20 PM
Reviewer
Elisa
Differential Revision
D24563: Standardize the database upgrade mechanism
Parents
R255:2b95d068f0e3: Merge branch 'release/19.12'
Branches
Unknown
Tags
Unknown