From 53b68fdabd94d67009667fa386b8725241d5e32a Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Wed, 17 Feb 2021 08:14:33 +0100 Subject: [PATCH] fix db migration --- music_assistant/constants.py | 2 +- music_assistant/helpers/migration.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) 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 = [] -- 2.34.1