Skip to content

Commit

Permalink
models.file:File.processed_name - rename to processed_names and turn …
Browse files Browse the repository at this point in the history
…into a list
  • Loading branch information
MatteoCampinoti94 committed Oct 29, 2024
1 parent 3993040 commit d755d57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion acacore/database/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion acacore/models/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d755d57

Please sign in to comment.