Files
hackymarket/prisma/migrations/20260331194009_more_tables/migration.sql
2026-03-31 23:31:16 +02:00

30 lines
922 B
SQL

/*
Warnings:
- A unique constraint covering the columns `[hcaId]` on the table `User` will be added. If there are existing duplicate values, this will fail.
- Added the required column `hcaId` to the `User` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "User" ADD COLUMN "hcaId" TEXT NOT NULL;
-- CreateTable
CREATE TABLE "CreateAccount" (
"id" SERIAL NOT NULL,
"code" TEXT NOT NULL,
"publicKey" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "CreateAccount_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "CreateAccount_code_key" ON "CreateAccount"("code");
-- CreateIndex
CREATE UNIQUE INDEX "CreateAccount_publicKey_key" ON "CreateAccount"("publicKey");
-- CreateIndex
CREATE UNIQUE INDEX "User_hcaId_key" ON "User"("hcaId");