diff options
Diffstat (limited to 'db/migrations/0018_broken_clint_barton.sql')
| -rw-r--r-- | db/migrations/0018_broken_clint_barton.sql | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrations/0018_broken_clint_barton.sql b/db/migrations/0018_broken_clint_barton.sql new file mode 100644 index 00000000..0de46349 --- /dev/null +++ b/db/migrations/0018_broken_clint_barton.sql @@ -0,0 +1,13 @@ +CREATE TABLE "vendor_candidate_logs" ( + "id" serial PRIMARY KEY NOT NULL, + "vendor_candidate_id" integer NOT NULL, + "user_id" integer NOT NULL, + "action" varchar(100) NOT NULL, + "old_status" varchar(30), + "new_status" varchar(30), + "comment" text, + "created_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "vendor_candidate_logs" ADD CONSTRAINT "vendor_candidate_logs_vendor_candidate_id_vendor_candidates_id_fk" FOREIGN KEY ("vendor_candidate_id") REFERENCES "public"."vendor_candidates"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "vendor_candidate_logs" ADD CONSTRAINT "vendor_candidate_logs_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file |
