Skip to content

Commit

Permalink
fix: Job agent id is nullable (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 authored Oct 16, 2024
1 parent 5c73827 commit 2a4b590
Show file tree
Hide file tree
Showing 5 changed files with 3,642 additions and 6 deletions.
8 changes: 8 additions & 0 deletions packages/db/drizzle/0015_furry_omega_red.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE "job" DROP CONSTRAINT "job_job_agent_id_job_agent_id_fk";
--> statement-breakpoint
ALTER TABLE "job" ALTER COLUMN "job_agent_id" DROP NOT NULL;--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "job" ADD CONSTRAINT "job_job_agent_id_job_agent_id_fk" FOREIGN KEY ("job_agent_id") REFERENCES "public"."job_agent"("id") ON DELETE set null ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
Loading

0 comments on commit 2a4b590

Please sign in to comment.