node:20-alpine ships OpenSSL 3.x and has no libssl.so.1.1. Without the
openssl CLI, Prisma's version detection failed and fell back to the
openssl-1.1.x engine, which then failed to load its shared library and
emitted plain text instead of JSON ("Unexpected token 'E'..."), crashing
`prisma migrate deploy` at container startup.
- Install openssl in the build and runtime stages so detection succeeds
- Pin binaryTargets to linux-musl-openssl-3.0.x so the correct engine is bundled
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
46 lines
1.0 KiB
Plaintext
46 lines
1.0 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
enum ProjektStatus {
|
|
Aktiv
|
|
Abgeschlossen
|
|
}
|
|
|
|
model Projekt {
|
|
id String @id @default(cuid())
|
|
titel String
|
|
auftraggeber String?
|
|
datum DateTime? @db.Date
|
|
monteur String?
|
|
notiz String?
|
|
status ProjektStatus @default(Aktiv)
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
material Material[]
|
|
|
|
@@map("projekte")
|
|
}
|
|
|
|
model Material {
|
|
id String @id @default(cuid())
|
|
projektId String
|
|
projekt Projekt @relation(fields: [projektId], references: [id], onDelete: Cascade)
|
|
bezeichnung String
|
|
artNr String?
|
|
menge Decimal @db.Decimal(10, 2)
|
|
einheit String
|
|
notiz String?
|
|
erstelltVon String?
|
|
createdAt DateTime @default(now())
|
|
|
|
@@index([projektId])
|
|
@@map("material")
|
|
}
|