diff --git a/acacore/__version__.py b/acacore/__version__.py index e94f36f..6ed0182 100644 --- a/acacore/__version__.py +++ b/acacore/__version__.py @@ -1 +1 @@ -__version__ = "3.0.5" +__version__ = "3.0.6" diff --git a/acacore/database/upgrade.py b/acacore/database/upgrade.py index a37f62d..96e7ddc 100644 --- a/acacore/database/upgrade.py +++ b/acacore/database/upgrade.py @@ -115,6 +115,7 @@ def convert_action_data(data: dict): conn.execute("alter table Files add column parent text") # noinspection SqlWithoutWhere conn.execute("update Files set parent = null") + conn.execute("update Files set action = 'ignore' where action = 'template'") # Reset _IdentificationWarnings view conn.execute("drop view if exists _IdentificationWarnings") @@ -139,6 +140,7 @@ def convert_action_data(data: dict): # noinspection SqlResolve def upgrade_3to3_0_2(conn: Connection) -> Version: + conn.execute("update Files set action = 'ignore' where action = 'template'") conn.execute("drop view if exists _IdentificationWarnings") conn.execute( "CREATE VIEW _IdentificationWarnings AS" @@ -148,6 +150,12 @@ def upgrade_3to3_0_2(conn: Connection) -> Version: return set_db_version(conn, Version("3.0.2")) +def upgrade_3_0_2to3_0_6(conn: Connection) -> Version: + conn.execute("update Files set action = 'ignore' where action = 'template'") + conn.commit() + return set_db_version(conn, Version("3.0.6")) + + def get_upgrade_function(current_version: Version, latest_version: Version) -> Callable[[Connection], Version]: if current_version < Version("2.0.0"): return upgrade_1to2 @@ -157,6 +165,8 @@ def get_upgrade_function(current_version: Version, latest_version: Version) -> C return upgrade_2_0_2to3 elif current_version < Version("3.0.2"): return upgrade_3to3_0_2 + elif current_version < Version("3.0.6"): + return upgrade_3_0_2to3_0_6 elif current_version < latest_version: return lambda c: set_db_version(c, Version(__version__)) else: diff --git a/pyproject.toml b/pyproject.toml index e8d4687..04de364 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "acacore" -version = "3.0.5" +version = "3.0.6" description = "" authors = ["Matteo Campinoti "] license = "GPL-3.0"