mirror of
https://github.com/SrIzan10/hackymarket.git
synced 2026-06-06 00:56:52 +00:00
30 lines
922 B
SQL
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");
|