Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
chore(prisma): added migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
GGORG0 committed Jun 29, 2022
1 parent fff965f commit e8f0fda
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions prisma/migrations/20220629185602_upload_keys/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- CreateTable
CREATE TABLE "UploadKey" (
"userId" UUID NOT NULL,
"key" TEXT NOT NULL,

CONSTRAINT "UploadKey_pkey" PRIMARY KEY ("key")
);

-- CreateIndex
CREATE UNIQUE INDEX "UploadKey_userId_key" ON "UploadKey"("userId");

-- AddForeignKey
ALTER TABLE "UploadKey" ADD CONSTRAINT "UploadKey_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("uuid") ON DELETE RESTRICT ON UPDATE CASCADE;
2 changes: 2 additions & 0 deletions prisma/migrations/20220629193027_upload_key_fix/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- DropIndex
DROP INDEX "UploadKey_userId_key";

0 comments on commit e8f0fda

Please sign in to comment.