modified cascade from planrecommendations

This commit is contained in:
Khalim Conn-Kowlessar 2026-02-22 10:57:16 +00:00
parent cb0475db58
commit 0277c98632
4 changed files with 5668 additions and 1 deletions

View file

@ -0,0 +1,3 @@
ALTER TABLE "plan_recommendations" DROP CONSTRAINT "plan_recommendations_recommendation_id_recommendation_id_fk";
--> statement-breakpoint
ALTER TABLE "plan_recommendations" ADD CONSTRAINT "plan_recommendations_recommendation_id_recommendation_id_fk" FOREIGN KEY ("recommendation_id") REFERENCES "public"."recommendation"("id") ON DELETE no action ON UPDATE no action;

File diff suppressed because it is too large Load diff

View file

@ -1072,6 +1072,13 @@
"when": 1771754572720,
"tag": "0152_sparkling_kat_farrell",
"breakpoints": true
},
{
"idx": 153,
"version": "7",
"when": 1771757665072,
"tag": "0153_large_machine_man",
"breakpoints": true
}
]
}

View file

@ -242,7 +242,7 @@ export const planRecommendations = pgTable(
mode: "bigint",
})
.notNull()
.references(() => recommendation.id, { onDelete: "cascade" }),
.references(() => recommendation.id),
},
(table) => [
index("idx_plan_recommendations_plan_id").on(table.planId),