Working on the API route for upload and the ping. adding types for actions.

This commit is contained in:
charles-gauthereau
2024-11-29 20:04:32 +01:00
parent e49a953852
commit bf4fce3a96
18 changed files with 283 additions and 30 deletions
@@ -0,0 +1,9 @@
/*
Warnings:
- Added the required column `backupToRestore` to the `databases` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "databases" ADD COLUMN "backupToRestore" TEXT NOT NULL,
ADD COLUMN "isWaitingForBackup" BOOLEAN NOT NULL DEFAULT false;
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "databases" ALTER COLUMN "backupToRestore" DROP NOT NULL,
ALTER COLUMN "isWaitingForBackup" DROP NOT NULL;
+9 -7
View File
@@ -97,13 +97,15 @@ enum Dbms {
}
model Database {
id String @id @default(cuid())
name String
dbms Dbms
generatedId String @unique
description String?
backupPolicy String? @map("backup_policy")
createdAt DateTime @default(now()) @map("created_at")
id String @id @default(cuid())
name String
dbms Dbms
generatedId String @unique
description String?
backupPolicy String? @map("backup_policy")
createdAt DateTime @default(now()) @map("created_at")
isWaitingForBackup Boolean? @default(false)
backupToRestore String?
agentId String @map("agent_id")
agent Agent @relation(fields: [agentId], references: [id], onDelete: Cascade)