Skip to content
  • Jerome Guidon's avatar
    Standardize the database upgrade mechanism · 977c002b
    Jerome Guidon authored and Nate Graham's avatar Nate Graham committed
    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
    977c002b