File tree Expand file tree Collapse file tree 3 files changed +9769
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9769
-0
lines changed Original file line number Diff line number Diff line change 1+ CREATE TABLE "form " (
2+ " id" text PRIMARY KEY NOT NULL ,
3+ " workflow_id" text NOT NULL ,
4+ " user_id" text NOT NULL ,
5+ " identifier" text NOT NULL ,
6+ " title" text NOT NULL ,
7+ " description" text ,
8+ " is_active" boolean DEFAULT true NOT NULL ,
9+ " customizations" json DEFAULT ' {}' ,
10+ " auth_type" text DEFAULT ' public' NOT NULL ,
11+ " password" text ,
12+ " allowed_emails" json DEFAULT ' []' ,
13+ " show_branding" boolean DEFAULT true NOT NULL ,
14+ " created_at" timestamp DEFAULT now() NOT NULL ,
15+ " updated_at" timestamp DEFAULT now() NOT NULL
16+ );
17+ -- > statement-breakpoint
18+ ALTER TABLE " form" ADD CONSTRAINT " form_workflow_id_workflow_id_fk" FOREIGN KEY (" workflow_id" ) REFERENCES " public" ." workflow" (" id" ) ON DELETE cascade ON UPDATE no action;-- > statement-breakpoint
19+ ALTER TABLE " form" ADD CONSTRAINT " form_user_id_user_id_fk" FOREIGN KEY (" user_id" ) REFERENCES " public" ." user" (" id" ) ON DELETE cascade ON UPDATE no action;-- > statement-breakpoint
20+ CREATE UNIQUE INDEX "form_identifier_idx " ON " form" USING btree (" identifier" );-- > statement-breakpoint
21+ CREATE INDEX "form_workflow_id_idx " ON " form" USING btree (" workflow_id" );-- > statement-breakpoint
22+ CREATE INDEX "form_user_id_idx " ON " form" USING btree (" user_id" );
You can’t perform that action at this time.
0 commit comments