7d650e4c10
Uniform stock management for healthcare linen rooms: the coordinator app, the phone counter and the staff app, for your own server. Built from d947f89 on 2026-09-15. Licensed under the Functional Source License (FSL-1.1-ALv2).
22 lines
666 B
SQL
22 lines
666 B
SQL
-- AlterTable
|
|
ALTER TABLE "User" ADD COLUMN "totpEnabledAt" TIMESTAMP(3),
|
|
ADD COLUMN "totpSecret" TEXT NOT NULL DEFAULT '';
|
|
|
|
-- CreateTable
|
|
CREATE TABLE "RecoveryCode" (
|
|
"id" TEXT NOT NULL,
|
|
"userId" TEXT NOT NULL,
|
|
"codeHash" TEXT NOT NULL,
|
|
"usedAt" TIMESTAMP(3),
|
|
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
CONSTRAINT "RecoveryCode_pkey" PRIMARY KEY ("id")
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE INDEX "RecoveryCode_userId_idx" ON "RecoveryCode"("userId");
|
|
|
|
-- AddForeignKey
|
|
ALTER TABLE "RecoveryCode" ADD CONSTRAINT "RecoveryCode_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
|