diff --git a/server/prisma/migrations/20210114134149_add_panos/migration.sql b/server/prisma/migrations/20210114134149_add_panos/migration.sql new file mode 100644 index 0000000..5fbde91 --- /dev/null +++ b/server/prisma/migrations/20210114134149_add_panos/migration.sql @@ -0,0 +1,15 @@ +-- CreateTable +CREATE TABLE "PanOS" ( +"id" SERIAL, + "description" TEXT NOT NULL, + "ip" TEXT NOT NULL, + "encryptedKey" TEXT NOT NULL, + "note" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "PanOS.ip_unique" ON "PanOS"("ip"); diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index fb36f6d..db091e4 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -122,3 +122,13 @@ model Statistic { totalWifiDevices Int onlineWifiDevices Int } + +model PanOS { + id Int @id @default(autoincrement()) + description String + ip String @unique + encryptedKey String + note String? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +}