Skip to content

Commit

Permalink
database.upgrade:upgrade_2_0_2to3 - add _IdentificationWarnings reset
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Aug 20, 2024
1 parent 11e26c1 commit 119e59f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions acacore/database/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ def convert_action_data(data: dict):
# noinspection SqlWithoutWhere
conn.execute("update Files set parent = null")

# Reset _IdentificationWarnings view
conn.execute("drop view if exists _IdentificationWarnings")
conn.execute(
"CREATE VIEW _IdentificationWarnings AS"
' SELECT * FROM Files WHERE "Files".warning is not null or "Files".puid is NULL;'
)

cursor = conn.execute("select * from Files where action_data != '{}'")
cursor.row_factory = Row

Expand Down

0 comments on commit 119e59f

Please sign in to comment.