lasthourcloud/apps/api/prisma/migrations/20220913092100_preview_applications/migration.sql

19 lines
719 B
MySQL
Raw Normal View History

2022-09-13 07:57:57 +00:00
-- AlterTable
ALTER TABLE "Build" ADD COLUMN "previewApplicationId" TEXT;
-- CreateTable
CREATE TABLE "PreviewApplication" (
"id" TEXT NOT NULL PRIMARY KEY,
2022-09-13 13:50:20 +00:00
"pullmergeRequestId" TEXT NOT NULL,
"sourceBranch" TEXT NOT NULL,
2022-09-13 07:57:57 +00:00
"isRandomDomain" BOOLEAN NOT NULL DEFAULT false,
"customDomain" TEXT,
"applicationId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "PreviewApplication_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "Application" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "PreviewApplication_applicationId_key" ON "PreviewApplication"("applicationId");