This repository has been archived on 2026-01-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-07-07 17:47:57 +02:00

37 lines
1023 B
SQL

/*
Warnings:
- You are about to drop the `Module` table. If the table is not empty, all the data it contains will be lost.
*/
-- CreateEnum
CREATE TYPE "CustomerFormType" AS ENUM ('TYPE1', 'TYPE2', 'TYPE3');
-- DropForeignKey
ALTER TABLE "Module" DROP CONSTRAINT "Module_createdById_fkey";
-- DropTable
DROP TABLE "Module";
-- DropEnum
DROP TYPE "ModuleType";
-- CreateTable
CREATE TABLE "CustomerForm" (
"id" DOUBLE PRECISION NOT NULL,
"type" "CustomerFormType" NOT NULL,
"text" TEXT NOT NULL,
"deleted" BOOLEAN NOT NULL DEFAULT false,
"createdById" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "CustomerForm_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "CustomerForm_id_key" ON "CustomerForm"("id");
-- AddForeignKey
ALTER TABLE "CustomerForm" ADD CONSTRAINT "CustomerForm_createdById_fkey" FOREIGN KEY ("createdById") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;