diff --git a/acacore/database/upgrade.py b/acacore/database/upgrade.py index c9cedeb..a2e34f4 100644 --- a/acacore/database/upgrade.py +++ b/acacore/database/upgrade.py @@ -220,7 +220,7 @@ def upgrade_3_2to3_3(conn: Connection) -> Version: if not conn.execute("select 1 from pragma_table_info('Files') where name = 'original_name'").fetchone(): conn.execute("alter table Files add column original_name text not null default ''") if not conn.execute("select 1 from pragma_table_info('Files') where name = 'processed_name'").fetchone(): - conn.execute("alter table Files add column processed_name text default null") + conn.execute("alter table Files add column processed_name text default '[]'") def _find_original_name(uuid: str, relative_path: str) -> str: original_path: Path = Path(relative_path) diff --git a/acacore/models/file.py b/acacore/models/file.py index 737d1be..9675651 100644 --- a/acacore/models/file.py +++ b/acacore/models/file.py @@ -91,7 +91,7 @@ class File(BaseModel): processed: bool = False lock: bool = False original_name: str - processed_name: str | None = None + processed_names: list[str] = Field(default_factory=list) root: Path | None = DBField(None, ignore=True) # noinspection PyNestedDecorators