From 610d3bccf1cb640e2a21df28d8d2a954c2bf337e Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Thu, 5 Jun 2025 01:53:35 +0000
Subject: (대표님) 변경사항 0604 - OCR 관련 및 drizzle generated sqls
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 db/migrations/0108_flashy_molecule_man.sql | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 db/migrations/0108_flashy_molecule_man.sql

(limited to 'db/migrations/0108_flashy_molecule_man.sql')

diff --git a/db/migrations/0108_flashy_molecule_man.sql b/db/migrations/0108_flashy_molecule_man.sql
new file mode 100644
index 00000000..7a6d69e0
--- /dev/null
+++ b/db/migrations/0108_flashy_molecule_man.sql
@@ -0,0 +1,27 @@
+ALTER TABLE "tech_sales_rfqs" RENAME COLUMN "item_id" TO "item_shipbuilding_id";--> statement-breakpoint
+ALTER TABLE "tech_sales_rfqs" DROP CONSTRAINT "tech_sales_rfqs_item_id_items_id_fk";
+--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "drawing_kind" varchar(10);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "drawing_move_gbn" varchar(50);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "discipline" varchar(10);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "external_document_id" varchar(100);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "external_system_type" varchar(20);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "external_synced_at" timestamp;--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "c_gbn" varchar(50);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "d_gbn" varchar(50);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "degree_gbn" varchar(50);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "dept_gbn" varchar(50);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "j_gbn" varchar(50);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "s_gbn" varchar(50);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "shi_drawing_no" varchar(100);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "manager" varchar(100);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "manager_enm" varchar(100);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "manager_no" varchar(50);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "register_group" integer;--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "register_group_id" integer;--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "create_user_no" varchar(50);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "create_user_id" varchar(100);--> statement-breakpoint
+ALTER TABLE "documents" ADD COLUMN "create_user_enm" varchar(100);--> statement-breakpoint
+ALTER TABLE "tech_sales_rfqs" ADD CONSTRAINT "tech_sales_rfqs_item_shipbuilding_id_item_shipbuilding_id_fk" FOREIGN KEY ("item_shipbuilding_id") REFERENCES "public"."item_shipbuilding"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+CREATE UNIQUE INDEX "unique_external_doc" ON "documents" USING btree ("contract_id","external_document_id","external_system_type") WHERE "documents"."external_document_id" IS NOT NULL;--> statement-breakpoint
+CREATE INDEX "drawing_kind_idx" ON "documents" USING btree ("drawing_kind");
\ No newline at end of file
-- 
cgit v1.2.3

