diff --git a/prisma/migrations/20250414201604_uptime_history/migration.sql b/prisma/migrations/20250414201604_uptime_history/migration.sql new file mode 100644 index 0000000..3021ba4 --- /dev/null +++ b/prisma/migrations/20250414201604_uptime_history/migration.sql @@ -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") +); diff --git a/prisma/schema.prisma b/prisma/schema.prisma index e96f1bd..55fe57d 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -25,6 +25,13 @@ model application { 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 { id Int @id @default(autoincrement()) name String