feat(db,contracts): trash_item migration and file manager contract refinements

- 0024_trash: trash_item table + unique idempotency index on artifact(files_idem)
- files.ts: TrashItemRow, delete planId/planExpiresAt, organize group warnings,
  scrape returns refreshMetadata taskId
- registry tests list the new table/row schema

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-27 23:02:14 +08:00
1 parent 673cb3920a
commit 09f6e3a3e5
6 files changed
+98 -2

No files matched your search

+21
View File
@@ -1276,6 +1276,23 @@ export interface TitleAliasTable {
updated_at: GeneratedTimestamptz;
}
export interface TrashItemTable {
id: Generated<string>;
root_id: string;
library_root_id: string | null;
root_host_path: string;
original_path: string;
trash_path: string;
is_dir: Generated<boolean>;
size_bytes: Generated<number>;
actor: string | null;
deleted_at: GeneratedTimestamptz;
expires_at: Timestamptz;
asset_snapshot: Json | null;
created_at: GeneratedTimestamptz;
updated_at: GeneratedTimestamptz;
}
export interface DB {
acquisition_plan: AcquisitionPlanTable;
acquisition_slot: AcquisitionSlotTable;
@@ -1338,6 +1355,7 @@ export interface DB {
tasks_op_ledger: TasksOpLedgerTable;
tasks_run_meta: TasksRunMetaTable;
title_alias: TitleAliasTable;
trash_item: TrashItemTable;
}
export type AcquisitionPlanRow = Selectable<AcquisitionPlanTable>;
@@ -1523,3 +1541,6 @@ export type TasksRunMetaUpdate = Updateable<TasksRunMetaTable>;
export type TitleAliasRow = Selectable<TitleAliasTable>;
export type NewTitleAlias = Insertable<TitleAliasTable>;
export type TitleAliasUpdate = Updateable<TitleAliasTable>;
export type TrashItemRow = Selectable<TrashItemTable>;
export type NewTrashItem = Insertable<TrashItemTable>;
export type TrashItemUpdate = Updateable<TrashItemTable>;