Uptime History DB Model

This commit is contained in:
headlessdev 2025-04-14 22:16:22 +02:00
parent d779355c4c
commit 7da6501ca7
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,9 @@
-- CreateTable
CREATE TABLE "uptime_history" (
"id" SERIAL NOT NULL,
"applicationId" INTEGER NOT NULL DEFAULT 1,
"online" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "uptime_history_pkey" PRIMARY KEY ("id")
);

View File

@ -25,6 +25,13 @@ model application {
online Boolean @default(true) online Boolean @default(true)
} }
model uptime_history {
id Int @id @default(autoincrement())
applicationId Int @default(1)
online Boolean @default(true)
createdAt DateTime @default(now())
}
model server { model server {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
name String name String