From 58a11e37fe18d10d94bd65b255dd0717e0eb87c0 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 22 Mar 2022 14:58:08 +0100 Subject: [PATCH] Add schema --- .../migration.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 prisma/migrations/20220322135800_persistent_storage/migration.sql diff --git a/prisma/migrations/20220322135800_persistent_storage/migration.sql b/prisma/migrations/20220322135800_persistent_storage/migration.sql new file mode 100644 index 000000000..d26ae3f8b --- /dev/null +++ b/prisma/migrations/20220322135800_persistent_storage/migration.sql @@ -0,0 +1,18 @@ +-- CreateTable +CREATE TABLE "ApplicationPersistentStorage" ( + "id" TEXT NOT NULL PRIMARY KEY, + "applicationId" TEXT NOT NULL, + "path" TEXT NOT NULL, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + CONSTRAINT "ApplicationPersistentStorage_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "Application" ("id") ON DELETE RESTRICT ON UPDATE CASCADE +); + +-- CreateIndex +CREATE UNIQUE INDEX "ApplicationPersistentStorage_applicationId_key" ON "ApplicationPersistentStorage"("applicationId"); + +-- CreateIndex +CREATE UNIQUE INDEX "ApplicationPersistentStorage_path_key" ON "ApplicationPersistentStorage"("path"); + +-- CreateIndex +CREATE UNIQUE INDEX "ApplicationPersistentStorage_applicationId_path_key" ON "ApplicationPersistentStorage"("applicationId", "path");