Files

24 lines
757 B
SQL

/*
Warnings:
- You are about to drop the column `key` on the `ApiKey` table. All the data in the column will be lost.
- A unique constraint covering the columns `[keyId]` on the table `ApiKey` will be added. If there are existing duplicate values, this will fail.
- Added the required column `keyId` to the `ApiKey` table without a default value. This is not possible if the table is not empty.
*/
-- DropIndex
DROP INDEX "ApiKey_key_active_idx";
-- DropIndex
DROP INDEX "ApiKey_key_key";
-- AlterTable
ALTER TABLE "ApiKey" DROP COLUMN "key",
ADD COLUMN "keyId" TEXT NOT NULL;
-- CreateIndex
CREATE UNIQUE INDEX "ApiKey_keyId_key" ON "ApiKey"("keyId");
-- CreateIndex
CREATE INDEX "ApiKey_keyId_active_idx" ON "ApiKey"("keyId", "active");