feat: persist fields and recipients for document editing

This commit is contained in:
Mythie
2023-06-21 23:49:23 +10:00
parent 3aea62e898
commit eea09dcfac
28 changed files with 1432 additions and 113 deletions

View File

@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "FieldType" ADD VALUE 'NAME';

View File

@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "FieldType" ADD VALUE 'EMAIL';

View File

@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "Field" ADD COLUMN "height" INTEGER NOT NULL DEFAULT -1,
ADD COLUMN "width" INTEGER NOT NULL DEFAULT -1;

View File

@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[documentId,email]` on the table `Recipient` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "Recipient_documentId_email_key" ON "Recipient"("documentId", "email");

View File

@ -0,0 +1,9 @@
-- AlterTable
ALTER TABLE "Field" ALTER COLUMN "positionX" SET DEFAULT 0,
ALTER COLUMN "positionX" SET DATA TYPE DECIMAL(65,30),
ALTER COLUMN "positionY" SET DEFAULT 0,
ALTER COLUMN "positionY" SET DATA TYPE DECIMAL(65,30),
ALTER COLUMN "height" SET DEFAULT -1,
ALTER COLUMN "height" SET DATA TYPE DECIMAL(65,30),
ALTER COLUMN "width" SET DEFAULT -1,
ALTER COLUMN "width" SET DATA TYPE DECIMAL(65,30);