From: Marcel van der Veldt Date: Wed, 17 Feb 2021 07:14:33 +0000 (+0100) Subject: fix db migration X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=53b68fdabd94d67009667fa386b8725241d5e32a;p=music-assistant-server.git fix db migration --- diff --git a/music_assistant/constants.py b/music_assistant/constants.py index 056d7d5d..e995e0a3 100755 --- a/music_assistant/constants.py +++ b/music_assistant/constants.py @@ -1,6 +1,6 @@ """All constants for Music Assistant.""" -__version__ = "0.1.0" +__version__ = "0.1.1" REQUIRED_PYTHON_VER = "3.7" # configuration keys/attributes diff --git a/music_assistant/helpers/migration.py b/music_assistant/helpers/migration.py index a82931cc..fa813289 100644 --- a/music_assistant/helpers/migration.py +++ b/music_assistant/helpers/migration.py @@ -20,8 +20,8 @@ async def check_migrations(mass: MusicAssistant): prev_version = packaging.version.parse(mass.config.stored_config.get("version", "")) # perform version specific migrations - if not is_fresh_setup and prev_version < packaging.version.parse("0.0.70"): - await run_migration_0070(mass) + if not is_fresh_setup and prev_version < packaging.version.parse("0.1.1"): + await run_migration_1(mass) # store version in config mass.config.stored_config["version"] = app_version @@ -40,9 +40,9 @@ async def check_migrations(mass: MusicAssistant): await create_db_tables(mass.database.db_file) -async def run_migration_0070(mass: MusicAssistant): - """Run migration for version 0.0.70.""" - # 0.0.70 introduced major changes to all data models and db structure +async def run_migration_1(mass: MusicAssistant): + """Run migration for version 0.1.1.""" + # 0.1.0 introduced major changes to all data models and db structure # a full refresh of data is unavoidable data_path = mass.config.data_path tracks_loudness = []