summaryrefslogtreecommitdiff
path: root/db/migrations_backup/0086_chubby_proudstar.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrations_backup/0086_chubby_proudstar.sql')
-rw-r--r--db/migrations_backup/0086_chubby_proudstar.sql18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrations_backup/0086_chubby_proudstar.sql b/db/migrations_backup/0086_chubby_proudstar.sql
new file mode 100644
index 00000000..450f31fb
--- /dev/null
+++ b/db/migrations_backup/0086_chubby_proudstar.sql
@@ -0,0 +1,18 @@
+CREATE TABLE "form_templates" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "form_id" integer,
+ "file_name" varchar(255) NOT NULL,
+ "file_path" varchar(1024) NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "updated_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "contract_signers" ALTER COLUMN "signer_email" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "contract_signers" ALTER COLUMN "signer_name" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "contract_signers" ALTER COLUMN "signer_status" SET DEFAULT 'PENDING';--> statement-breakpoint
+ALTER TABLE "contract_envelopes" ADD COLUMN "file_name" varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE "contract_envelopes" ADD COLUMN "file_path" varchar(1024) NOT NULL;--> statement-breakpoint
+ALTER TABLE "contract_signers" ADD COLUMN "vendor_contact_id" integer;--> statement-breakpoint
+ALTER TABLE "contract_signers" ADD COLUMN "signer_type" varchar(20) DEFAULT 'VENDOR' NOT NULL;--> statement-breakpoint
+ALTER TABLE "form_templates" ADD CONSTRAINT "form_templates_form_id_forms_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."forms"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "contract_signers" ADD CONSTRAINT "contract_signers_vendor_contact_id_vendor_contacts_id_fk" FOREIGN KEY ("vendor_contact_id") REFERENCES "public"."vendor_contacts"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file