Files
mRemotify/backend/prisma/schema.prisma
deadRabbit 61fc29ea9d Fix Prisma OpenSSL error on Alpine Linux
- Add binaryTargets = ["native", "linux-musl-openssl-3.0.x"] to the
  Prisma generator so the correct engine binary is bundled for Alpine
- Install openssl in the runtime Docker stage via apk

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 12:40:18 +01:00

56 lines
1.5 KiB
Plaintext

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
}
datasource db {
provider = "postgresql"
url = env("POSTGRES_URL")
}
model User {
id String @id @default(cuid())
username String @unique
passwordHash String
createdAt DateTime @default(now())
folders Folder[]
connections Connection[]
@@map("users")
}
model Folder {
id String @id @default(cuid())
name String
parentId String?
parent Folder? @relation("FolderChildren", fields: [parentId], references: [id])
children Folder[] @relation("FolderChildren")
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
connections Connection[]
createdAt DateTime @default(now())
@@map("folders")
}
model Connection {
id String @id @default(cuid())
name String
host String
port Int
protocol String
username String
encryptedPassword String?
privateKey String?
domain String?
osType String?
notes String?
folderId String?
folder Folder? @relation(fields: [folderId], references: [id], onDelete: SetNull)
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
@@map("connections")
}