fix: add onDelete set null to reviewedBy FK

This commit is contained in:
2026-04-30 19:14:45 +08:00
parent 4e324fa6e0
commit 4c0284ef9e
2 changed files with 6 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
ALTER TABLE "community_suggestions" DROP CONSTRAINT "community_suggestions_reviewed_by_user_id_fk";
--> statement-breakpoint
ALTER TABLE "community_suggestions" ADD CONSTRAINT "community_suggestions_reviewed_by_user_id_fk" FOREIGN KEY ("reviewed_by") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;