aboutsummaryrefslogtreecommitdiffstats
path: root/packages/db/prisma/migrations/20240211184744_add_api_key
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-02-23 19:27:31 +0000
committerMohamedBassem <me@mbassem.com>2024-02-23 20:47:54 +0000
commite234d3535c363664902dffe89a2c61ddbc037da4 (patch)
tree5430570d98bc376ce92c8ecc5d2503ecced1d79b /packages/db/prisma/migrations/20240211184744_add_api_key
parentbed57209b09a4bd59dbaf010d58045fe77896ba8 (diff)
downloadkarakeep-e234d3535c363664902dffe89a2c61ddbc037da4.tar.zst
db: Migrate from prisma to drizzle
Diffstat (limited to 'packages/db/prisma/migrations/20240211184744_add_api_key')
-rw-r--r--packages/db/prisma/migrations/20240211184744_add_api_key/migration.sql16
1 files changed, 0 insertions, 16 deletions
diff --git a/packages/db/prisma/migrations/20240211184744_add_api_key/migration.sql b/packages/db/prisma/migrations/20240211184744_add_api_key/migration.sql
deleted file mode 100644
index c39bf511..00000000
--- a/packages/db/prisma/migrations/20240211184744_add_api_key/migration.sql
+++ /dev/null
@@ -1,16 +0,0 @@
--- CreateTable
-CREATE TABLE "ApiKey" (
- "id" TEXT NOT NULL PRIMARY KEY,
- "name" TEXT NOT NULL,
- "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
- "keyId" TEXT NOT NULL,
- "keyHash" TEXT NOT NULL,
- "userId" TEXT NOT NULL,
- CONSTRAINT "ApiKey_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
-);
-
--- CreateIndex
-CREATE UNIQUE INDEX "ApiKey_keyId_key" ON "ApiKey"("keyId");
-
--- CreateIndex
-CREATE UNIQUE INDEX "ApiKey_name_userId_key" ON "ApiKey"("name", "userId");