mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
## Description General enhancements for templates. ## Changes Made Added the following changes to the template flow: - Allow adding document meta settings - Allow adding email settings - Allow adding document access & action authentication - Allow adding recipient action authentication - Save the state between template steps similar to how it works for documents Other changes: - Extract common fields between document and template flows - Remove the title field from "Use template" since we now have it as part of the template flow - Add new API endpoint for generating templates ## Testing Performed Added E2E tests for templates and creating documents from templates
23 lines
694 B
SQL
23 lines
694 B
SQL
-- AlterTable
|
|
ALTER TABLE "Template" ADD COLUMN "authOptions" JSONB;
|
|
|
|
-- CreateTable
|
|
CREATE TABLE "TemplateMeta" (
|
|
"id" TEXT NOT NULL,
|
|
"subject" TEXT,
|
|
"message" TEXT,
|
|
"timezone" TEXT DEFAULT 'Etc/UTC',
|
|
"password" TEXT,
|
|
"dateFormat" TEXT DEFAULT 'yyyy-MM-dd hh:mm a',
|
|
"templateId" INTEGER NOT NULL,
|
|
"redirectUrl" TEXT,
|
|
|
|
CONSTRAINT "TemplateMeta_pkey" PRIMARY KEY ("id")
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "TemplateMeta_templateId_key" ON "TemplateMeta"("templateId");
|
|
|
|
-- AddForeignKey
|
|
ALTER TABLE "TemplateMeta" ADD CONSTRAINT "TemplateMeta_templateId_fkey" FOREIGN KEY ("templateId") REFERENCES "Template"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|