From: Marcel van der Veldt Date: Mon, 16 May 2022 22:22:12 +0000 (+0200) Subject: reset db due to breaking changes (again) X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=09a3147d6bf48661ca6d5ac6dfa45e5bb711d11d;p=music-assistant-server.git reset db due to breaking changes (again) --- diff --git a/music_assistant/helpers/database.py b/music_assistant/helpers/database.py index 67f69740..8419d7a0 100755 --- a/music_assistant/helpers/database.py +++ b/music_assistant/helpers/database.py @@ -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}")