reset db due to breaking changes (again)
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Mon, 16 May 2022 22:22:12 +0000 (00:22 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Mon, 16 May 2022 22:22:12 +0000 (00:22 +0200)
music_assistant/helpers/database.py

index 67f697400d8eec12e62359822f8a9120441bec31..8419d7a055149dbfaea4e4aab72f9ae09d5262f0 100755 (executable)
@@ -10,7 +10,7 @@ if TYPE_CHECKING:
     from music_assistant.mass import MusicAssistant
 
 
-SCHEMA_VERSION = 9
+SCHEMA_VERSION = 10
 
 TABLE_PROV_MAPPINGS = "provider_mappings"
 TABLE_TRACK_LOUDNESS = "track_loudness"
@@ -185,9 +185,8 @@ class Database:
                 # always create db tables if they don't exist to prevent errors trying to access them later
                 await self.__create_database_tables(db)
 
-                if prev_version < 9:
+                if prev_version < 10:
                     # refactored file provider, start clean just in case.
-                    await db.execute("DROP TABLE IF EXISTS filesystem_mappings")
                     await db.execute(f"DROP TABLE IF EXISTS {TABLE_ARTISTS}")
                     await db.execute(f"DROP TABLE IF EXISTS {TABLE_ALBUMS}")
                     await db.execute(f"DROP TABLE IF EXISTS {TABLE_TRACKS}")