11 lines
526 B
MySQL
11 lines
526 B
MySQL
|
|
CREATE TABLE "document_templates" (
|
||
|
|
"id" text PRIMARY KEY NOT NULL,
|
||
|
|
"name" text NOT NULL,
|
||
|
|
"form_template_id" text NOT NULL,
|
||
|
|
"signature_fields" jsonb,
|
||
|
|
"archived_at" timestamp,
|
||
|
|
"created_at" timestamp DEFAULT now() NOT NULL,
|
||
|
|
"updated_at" timestamp DEFAULT now() NOT NULL
|
||
|
|
);
|
||
|
|
--> statement-breakpoint
|
||
|
|
ALTER TABLE "document_templates" ADD CONSTRAINT "document_templates_form_template_id_form_templates_id_fk" FOREIGN KEY ("form_template_id") REFERENCES "public"."form_templates"("id") ON DELETE no action ON UPDATE no action;
|