Add portfolio thingies
This commit is contained in:
5
prisma/migrations/20251225010559_artwork_8/migration.sql
Normal file
5
prisma/migrations/20251225010559_artwork_8/migration.sql
Normal 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");
|
||||
7
prisma/migrations/20251225013027_artwork_9/migration.sql
Normal file
7
prisma/migrations/20251225013027_artwork_9/migration.sql
Normal 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");
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user