diff --git a/acacore/database/upgrade.py b/acacore/database/upgrade.py index cd897ba..a37f62d 100644 --- a/acacore/database/upgrade.py +++ b/acacore/database/upgrade.py @@ -148,10 +148,6 @@ def upgrade_3to3_0_2(conn: Connection) -> Version: return set_db_version(conn, Version("3.0.2")) -def upgrade_last(conn: Connection) -> Version: - return set_db_version(conn, Version(__version__)) - - def get_upgrade_function(current_version: Version, latest_version: Version) -> Callable[[Connection], Version]: if current_version < Version("2.0.0"): return upgrade_1to2 @@ -162,7 +158,7 @@ def get_upgrade_function(current_version: Version, latest_version: Version) -> C elif current_version < Version("3.0.2"): return upgrade_3to3_0_2 elif current_version < latest_version: - return upgrade_last + return lambda c: set_db_version(c, Version(__version__)) else: return lambda _: latest_version