1+ -- > statement-breakpoint
2+ CREATE TABLE "feedbacks " (
3+ " id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL ,
4+ " user_id" uuid,
5+ " email" text ,
6+ " message" text NOT NULL ,
7+ " page_url" text ,
8+ " user_agent" text ,
9+ " attachments" jsonb DEFAULT ' []' ::jsonb NOT NULL ,
10+ " metadata" jsonb DEFAULT ' {}' ::jsonb NOT NULL ,
11+ " created_at" timestamp with time zone DEFAULT now() NOT NULL
12+ );
13+ -- > statement-breakpoint
14+ ALTER TABLE " feedbacks" ENABLE ROW LEVEL SECURITY;-- > statement-breakpoint
15+ ALTER TABLE " project_invitations" DROP CONSTRAINT " project_invitations_invitee_email_project_id_unique" ;-- > statement-breakpoint
16+ ALTER TABLE " custom_domain_verification" DROP CONSTRAINT " custom_domain_verification_project_id_projects_id_fk" ;
17+ -- > statement-breakpoint
18+ ALTER TABLE " preview_domains" DROP CONSTRAINT " preview_domains_project_id_projects_id_fk" ;
19+ -- > statement-breakpoint
20+ ALTER TABLE " deployments" DROP CONSTRAINT " deployments_project_id_projects_id_fk" ;
21+ -- > statement-breakpoint
22+ ALTER TABLE " projects" ADD COLUMN " tags" varchar [] DEFAULT ' {}' ;-- > statement-breakpoint
23+ ALTER TABLE " projects" ADD COLUMN " updated_preview_img_at" timestamp with time zone ;-- > statement-breakpoint
24+ ALTER TABLE " feedbacks" ADD CONSTRAINT " feedbacks_user_id_users_id_fk" FOREIGN KEY (" user_id" ) REFERENCES " public" ." users" (" id" ) ON DELETE set null ON UPDATE cascade;-- > statement-breakpoint
25+ ALTER TABLE " custom_domain_verification" ADD CONSTRAINT " custom_domain_verification_project_id_projects_id_fk" FOREIGN KEY (" project_id" ) REFERENCES " public" ." projects" (" id" ) ON DELETE cascade ON UPDATE cascade;-- > statement-breakpoint
26+ ALTER TABLE " preview_domains" ADD CONSTRAINT " preview_domains_project_id_projects_id_fk" FOREIGN KEY (" project_id" ) REFERENCES " public" ." projects" (" id" ) ON DELETE cascade ON UPDATE cascade;-- > statement-breakpoint
27+ ALTER TABLE " deployments" ADD CONSTRAINT " deployments_project_id_projects_id_fk" FOREIGN KEY (" project_id" ) REFERENCES " public" ." projects" (" id" ) ON DELETE cascade ON UPDATE cascade;-- > statement-breakpoint
28+ CREATE INDEX "project_invitations_invitee_email_project_id_idx " ON " project_invitations" USING btree (" invitee_email" ," project_id" );
0 commit comments