-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
attach migration and id should not be null
- Loading branch information
1 parent
6c2ad0f
commit 00f1ef5
Showing
4 changed files
with
413 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CREATE TABLE IF NOT EXISTS "review_tags" ( | ||
"id" serial PRIMARY KEY NOT NULL, | ||
"title" varchar(8) NOT NULL, | ||
"parent" smallint NOT NULL | ||
); | ||
--> statement-breakpoint | ||
ALTER TABLE "posting_applicants" DROP CONSTRAINT "posting_applicants_owner_id_users_id_fk"; | ||
--> statement-breakpoint | ||
ALTER TABLE "posting_applicants" ALTER COLUMN "owner_id" SET NOT NULL;--> statement-breakpoint | ||
ALTER TABLE "posting_applicants" ALTER COLUMN "job_id" SET NOT NULL;--> statement-breakpoint | ||
DO $$ BEGIN | ||
ALTER TABLE "posting_applicants" ADD CONSTRAINT "posting_applicants_owner_id_users_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; | ||
EXCEPTION | ||
WHEN duplicate_object THEN null; | ||
END $$; |
Oops, something went wrong.