mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
added db migrations
This commit is contained in:
parent
a046ed4a5c
commit
cf47e475f2
3 changed files with 9403 additions and 0 deletions
16
src/app/db/migrations/0196_bouncy_speed.sql
Normal file
16
src/app/db/migrations/0196_bouncy_speed.sql
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
CREATE TABLE "pibi_requests" (
|
||||
"id" bigserial PRIMARY KEY NOT NULL,
|
||||
"hubspot_deal_id" text NOT NULL,
|
||||
"portfolio_id" bigint NOT NULL,
|
||||
"measure_name" text NOT NULL,
|
||||
"ordered_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"completed_at" timestamp with time zone,
|
||||
"created_by_user_id" bigint NOT NULL,
|
||||
"pushed_at" timestamp with time zone
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "survey_requests" ADD COLUMN "survey_type" text;--> statement-breakpoint
|
||||
ALTER TABLE "pibi_requests" ADD CONSTRAINT "pibi_requests_portfolio_id_portfolio_id_fk" FOREIGN KEY ("portfolio_id") REFERENCES "public"."portfolio"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "pibi_requests" ADD CONSTRAINT "pibi_requests_created_by_user_id_user_id_fk" FOREIGN KEY ("created_by_user_id") REFERENCES "public"."user"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||
CREATE INDEX "idx_pibi_requests_deal_id" ON "pibi_requests" USING btree ("hubspot_deal_id");--> statement-breakpoint
|
||||
CREATE INDEX "idx_pibi_requests_portfolio_id" ON "pibi_requests" USING btree ("portfolio_id");
|
||||
9380
src/app/db/migrations/meta/0196_snapshot.json
Normal file
9380
src/app/db/migrations/meta/0196_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1373,6 +1373,13 @@
|
|||
"when": 1778078457355,
|
||||
"tag": "0195_jittery_harry_osborn",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 196,
|
||||
"version": "7",
|
||||
"when": 1778144118367,
|
||||
"tag": "0196_bouncy_speed",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue