From c33c4ec075561d553b1397f148cda5b6ac96658c Mon Sep 17 00:00:00 2001 From: Chandler Copeland Date: Mon, 6 Apr 2026 12:15:12 -0600 Subject: [PATCH] chore(18-01): generate migration 0012 for document_templates table - CREATE TABLE document_templates with 7 columns - FK constraint form_template_id -> form_templates(id) ON DELETE no action - No alterations to existing tables --- .../drizzle/0012_ancient_blue_shield.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 teressa-copeland-homes/drizzle/0012_ancient_blue_shield.sql diff --git a/teressa-copeland-homes/drizzle/0012_ancient_blue_shield.sql b/teressa-copeland-homes/drizzle/0012_ancient_blue_shield.sql new file mode 100644 index 0000000..ee1efa7 --- /dev/null +++ b/teressa-copeland-homes/drizzle/0012_ancient_blue_shield.sql @@ -0,0 +1,11 @@ +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; \ No newline at end of file