From 9ceed79cf32c896f8a998399bf1b296506b2cd4a Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Tue, 8 Apr 2025 03:08:19 +0000
Subject: 로그인 및 미들웨어 처리. 구조 변경
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 db/migrations_backup/0110_round_iron_monger.sql | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 db/migrations_backup/0110_round_iron_monger.sql

(limited to 'db/migrations_backup/0110_round_iron_monger.sql')

diff --git a/db/migrations_backup/0110_round_iron_monger.sql b/db/migrations_backup/0110_round_iron_monger.sql
new file mode 100644
index 00000000..f41290d3
--- /dev/null
+++ b/db/migrations_backup/0110_round_iron_monger.sql
@@ -0,0 +1,23 @@
+CREATE TABLE "vendor_project_pqs" (
+	"id" serial PRIMARY KEY NOT NULL,
+	"vendor_id" integer NOT NULL,
+	"project_id" integer NOT NULL,
+	"status" varchar(20) DEFAULT 'REQUESTED' NOT NULL,
+	"submitted_at" timestamp,
+	"approved_at" timestamp,
+	"rejected_at" timestamp,
+	"reject_reason" text,
+	"created_at" timestamp DEFAULT now() NOT NULL,
+	"updated_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "vendor_pq_criteria_answers" DROP CONSTRAINT "vendor_pq_criteria_answers_vendor_id_vendors_id_fk";
+--> statement-breakpoint
+ALTER TABLE "vendor_pq_criteria_answers" DROP CONSTRAINT "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk";
+--> statement-breakpoint
+ALTER TABLE "vendor_pq_criteria_answers" ADD COLUMN "project_id" integer;--> statement-breakpoint
+ALTER TABLE "vendor_project_pqs" ADD CONSTRAINT "vendor_project_pqs_vendor_id_vendors_id_fk" FOREIGN KEY ("vendor_id") REFERENCES "public"."vendors"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
+ALTER TABLE "vendor_project_pqs" ADD CONSTRAINT "vendor_project_pqs_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
+ALTER TABLE "vendor_pq_criteria_answers" ADD CONSTRAINT "vendor_pq_criteria_answers_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
+ALTER TABLE "vendor_pq_criteria_answers" ADD CONSTRAINT "vendor_pq_criteria_answers_vendor_id_vendors_id_fk" FOREIGN KEY ("vendor_id") REFERENCES "public"."vendors"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
+ALTER TABLE "vendor_pq_criteria_answers" ADD CONSTRAINT "vendor_pq_criteria_answers_criteria_id_pq_criterias_id_fk" FOREIGN KEY ("criteria_id") REFERENCES "public"."pq_criterias"("id") ON DELETE cascade ON UPDATE cascade;
\ No newline at end of file
-- 
cgit v1.2.3

