From 2bd91fa97090ed52d7b0cf956509c51cbadf7b7f Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 29 Apr 2022 22:25:27 +0200 Subject: [PATCH] migration for fider --- .../20220429202516_fider/migration.sql | 25 +++++++++++++++++++ prisma/schema.prisma | 23 +++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 prisma/migrations/20220429202516_fider/migration.sql diff --git a/prisma/migrations/20220429202516_fider/migration.sql b/prisma/migrations/20220429202516_fider/migration.sql new file mode 100644 index 000000000..a6d31a24d --- /dev/null +++ b/prisma/migrations/20220429202516_fider/migration.sql @@ -0,0 +1,25 @@ +-- CreateTable +CREATE TABLE "Fider" ( + "id" TEXT NOT NULL PRIMARY KEY, + "serviceId" TEXT NOT NULL, + "postgresqlUser" TEXT NOT NULL, + "postgresqlPassword" TEXT NOT NULL, + "postgresqlDatabase" TEXT NOT NULL, + "postgresqlPublicPort" INTEGER, + "jwtSecret" TEXT NOT NULL, + "emailNoreply" TEXT, + "emailMailgunApiKey" TEXT, + "emailMailgunDomain" TEXT, + "emailMailgunRegion" TEXT, + "emailSmtpHost" TEXT, + "emailSmtpPort" INTEGER, + "emailSmtpUser" TEXT, + "emailSmtpPassword" TEXT, + "emailSmtpEnableStartTls" BOOLEAN NOT NULL DEFAULT false, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + CONSTRAINT "Fider_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE +); + +-- CreateIndex +CREATE UNIQUE INDEX "Fider_serviceId_key" ON "Fider"("serviceId"); diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 1c10822f7..9930b8505 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -306,6 +306,7 @@ model Service { persistentStorage ServicePersistentStorage[] umami Umami? hasura Hasura? + fider Fider? } model PlausibleAnalytics { @@ -417,3 +418,25 @@ model Hasura { createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } + +model Fider { + id String @id @default(cuid()) + serviceId String @unique + postgresqlUser String + postgresqlPassword String + postgresqlDatabase String + postgresqlPublicPort Int? + jwtSecret String + emailNoreply String? + emailMailgunApiKey String? + emailMailgunDomain String? + emailMailgunRegion String? + emailSmtpHost String? + emailSmtpPort Int? + emailSmtpUser String? + emailSmtpPassword String? + emailSmtpEnableStartTls Boolean @default(false) + service Service @relation(fields: [serviceId], references: [id]) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +}