Add portfolio thingies

This commit is contained in:
2025-12-25 09:24:27 +01:00
parent ee454261cb
commit ededf3df06
13 changed files with 332 additions and 103 deletions

View File

@ -0,0 +1,5 @@
-- CreateIndex
CREATE INDEX "Artwork_published_sortKey_id_idx" ON "Artwork"("published", "sortKey", "id");
-- CreateIndex
CREATE INDEX "Artwork_year_published_sortKey_id_idx" ON "Artwork"("year", "published", "sortKey", "id");

View File

@ -0,0 +1,7 @@
-- AlterTable
ALTER TABLE "Artwork" ADD COLUMN "colorError" TEXT,
ADD COLUMN "colorStatus" TEXT NOT NULL DEFAULT 'PENDING',
ADD COLUMN "colorsGeneratedAt" TIMESTAMP(3);
-- CreateIndex
CREATE INDEX "Artwork_colorStatus_idx" ON "Artwork"("colorStatus");

View File

@ -37,6 +37,10 @@ model Artwork {
published Boolean @default(false)
setAsHeader Boolean @default(false)
colorStatus String @default("PENDING") // PENDING | PROCESSING | READY | FAILED
colorError String?
colorsGeneratedAt DateTime?
fileId String @unique
file FileData @relation(fields: [fileId], references: [id])
@ -50,6 +54,10 @@ model Artwork {
colors ArtworkColor[]
tags ArtTag[]
variants FileVariant[]
@@index([colorStatus])
@@index([published, sortKey, id])
@@index([year, published, sortKey, id])
}
model Album {