-
-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
118 additions
and
7 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
apps/api/src/prisma/migrations/20231130184144_uptime_kb_config/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
-- AlterTable | ||
ALTER TABLE "Config" ADD COLUMN "client_version" TEXT, | ||
ADD COLUMN "feature_previews" BOOLEAN NOT NULL DEFAULT false, | ||
ADD COLUMN "gh_version" TEXT, | ||
ADD COLUMN "out_of_office" BOOLEAN NOT NULL DEFAULT false, | ||
ADD COLUMN "out_of_office_end" TIMESTAMP(3), | ||
ADD COLUMN "out_of_office_message" TEXT, | ||
ADD COLUMN "out_of_office_start" TIMESTAMP(3), | ||
ADD COLUMN "portal_locale" TEXT, | ||
ADD COLUMN "sso_active" BOOLEAN NOT NULL DEFAULT false, | ||
ADD COLUMN "sso_provider" TEXT; | ||
|
||
-- CreateTable | ||
CREATE TABLE "SSO" ( | ||
"id" TEXT NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"name" TEXT NOT NULL, | ||
"clientId" TEXT NOT NULL, | ||
"clientSecret" TEXT NOT NULL, | ||
"active" BOOLEAN NOT NULL, | ||
"issuer" TEXT, | ||
"tenantId" TEXT, | ||
|
||
CONSTRAINT "SSO_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Uptime" ( | ||
"id" TEXT NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"name" TEXT NOT NULL, | ||
"url" TEXT NOT NULL, | ||
"active" BOOLEAN NOT NULL DEFAULT false, | ||
"webhook" TEXT, | ||
"latency" INTEGER, | ||
"status" BOOLEAN, | ||
|
||
CONSTRAINT "Uptime_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "knowledgeBase" ( | ||
"id" TEXT NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"title" TEXT NOT NULL, | ||
"content" TEXT NOT NULL, | ||
"tags" TEXT[], | ||
"author" TEXT NOT NULL, | ||
"public" BOOLEAN NOT NULL DEFAULT false, | ||
"ticketId" TEXT, | ||
|
||
CONSTRAINT "knowledgeBase_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "knowledgeBase" ADD CONSTRAINT "knowledgeBase_ticketId_fkey" FOREIGN KEY ("ticketId") REFERENCES "Ticket"("id") ON DELETE SET NULL ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters