From e1ea1542860b4f19beb142c7d4327f4762af0b37 Mon Sep 17 00:00:00 2001 From: Ralf Stemmer Date: Sun, 19 Jul 2020 06:52:41 +0200 Subject: [PATCH] Enable all upgrades and use bare database accesses for MusicDB --- mod/upgrade.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mod/upgrade.py b/mod/upgrade.py index cdaa82f3..776fc020 100644 --- a/mod/upgrade.py +++ b/mod/upgrade.py @@ -33,7 +33,11 @@ class upgrade(MDBModule, MusicDBDatabase): def __init__(self, config, database): MDBModule.__init__(self) - self.db = database + # The MusicDatabase object should not be used + # because the database may be outdated when calling upgrade + # Use the low level interface instead + #self.db = database + self.db = Database(config.database.path) self.cfg = config self.fs = None @@ -343,9 +347,9 @@ def UpgradeConfiguration(self): def MDBM_Main(self, args): self.UpgradeConfiguration() - # self.UpgradeMusicDB() - # self.UpgradeTrackerDB() - # self.UpgradeLycraDB() + self.UpgradeMusicDB() + self.UpgradeTrackerDB() + self.UpgradeLycraDB() #self.UpgradeWebUIConfiguration() return 0