feat/add basic authentication for apps

This commit is contained in:
biersoeckli
2025-01-07 10:53:18 +00:00
parent 5ef1fa22e6
commit 35e949a1fb
15 changed files with 502 additions and 20 deletions

View File

@@ -0,0 +1,10 @@
-- CreateTable
CREATE TABLE "AppBasicAuth" (
"id" TEXT NOT NULL PRIMARY KEY,
"username" TEXT NOT NULL,
"password" TEXT NOT NULL,
"appId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "AppBasicAuth_appId_fkey" FOREIGN KEY ("appId") REFERENCES "App" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);

View File

@@ -155,6 +155,7 @@ model App {
appPorts AppPort[]
appVolumes AppVolume[]
appFileMounts AppFileMount[]
appBasicAuths AppBasicAuth[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -247,3 +248,14 @@ model VolumeBackup {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model AppBasicAuth {
id String @id @default(uuid())
username String
password String
appId String
app App @relation(fields: [appId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}