feat(storage): add archive storage support for assets (#514)

* feat(storage): add archive storage support for assets

* fix(webui): show archive icon in front of file name in breadcrumb bar

* fix(webui): display archive icon in breadcrumbs when restoring

* refactor(transcode): simplify restore asset workflow to single while loop

* docs(configuration): add archive storage documentation and readme entries

* fix(webui): show archive icon in front of version names and prevent version card overflow

* fix(webui): fix overflow in manage versions dialog scroll area

* fix(webui): prevent manage versions dialog overflow on long file names

* docs(configuration): fix archive storage environment variables and defaults

* fix(storage): address code review findings for archive storage
This commit is contained in:
Yiling-J
2026-11-03 20:31:56 +08:00
committed by GitHub
parent 49a2d7c380
commit ba3c6dbfee
110 changed files with 7013 additions and 199 deletions
@@ -0,0 +1,25 @@
-- AlterEnum
-- This migration adds more than one value to an enum.
-- With PostgreSQL versions 11 and earlier, this is not possible
-- in a single migration. This can be worked around by creating
-- multiple migrations, each migration adding only one value to
-- the enum.
ALTER TYPE "AssetStatus" ADD VALUE 'archiving';
ALTER TYPE "AssetStatus" ADD VALUE 'archived';
ALTER TYPE "AssetStatus" ADD VALUE 'restoring';
-- AlterEnum
-- This migration adds more than one value to an enum.
-- With PostgreSQL versions 11 and earlier, this is not possible
-- in a single migration. This can be worked around by creating
-- multiple migrations, each migration adding only one value to
-- the enum.
ALTER TYPE "WorkflowTaskType" ADD VALUE 'archive_asset';
ALTER TYPE "WorkflowTaskType" ADD VALUE 'restore_asset';
-- AlterTable
ALTER TABLE "storage_keys" ADD COLUMN "is_archived" BOOLEAN NOT NULL DEFAULT false;
+12 -6
View File
@@ -40,6 +40,9 @@ enum AssetStatus {
uploaded
processing
processed
archiving
archived
restoring
failed
trashed
pending_purge
@@ -128,6 +131,8 @@ enum WorkflowTaskType {
query_embedding_for_search
agent_tool_call // @deprecated: Agent tools now execute directly in-process via Core services
kanban_agent_run
archive_asset
restore_asset
}
enum WorkflowTaskStatus {
@@ -606,12 +611,13 @@ model Asset {
}
model StorageKey {
id String @id @default(ulid())
key String @unique
status StorageKeyStatus @default(active)
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
assets Asset[]
id String @id @default(ulid())
key String @unique
status StorageKeyStatus @default(active)
isArchived Boolean @default(false) @map("is_archived")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
assets Asset[]
@@map("storage_keys")
}