Projektstart

This commit is contained in:
2026-01-22 16:19:07 +01:00
parent 5174b88af9
commit bc7fbf8ce6
1553 changed files with 111281 additions and 141 deletions

View File

@@ -0,0 +1,23 @@
-- CreateEnum
CREATE TYPE "ExportStatus" AS ENUM ('QUEUED', 'RUNNING', 'DONE', 'FAILED');
-- CreateTable
CREATE TABLE "ExportJob" (
"id" TEXT NOT NULL,
"tenantId" TEXT NOT NULL,
"status" "ExportStatus" NOT NULL DEFAULT 'QUEUED',
"format" TEXT NOT NULL,
"scope" TEXT NOT NULL,
"filePath" TEXT,
"error" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "ExportJob_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE INDEX "ExportJob_tenantId_idx" ON "ExportJob"("tenantId");
-- AddForeignKey
ALTER TABLE "ExportJob" ADD CONSTRAINT "ExportJob_tenantId_fkey" FOREIGN KEY ("tenantId") REFERENCES "Tenant"("id") ON DELETE RESTRICT ON UPDATE CASCADE;