From 86b1fd1cc801f45642f84d24c0b5c84368454ff0 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Tue, 9 Sep 2025 10:34:05 +0000
Subject: (최겸) 구매 입찰 사전견적, 입찰, 낙찰, 유찰, 재입찰 기능 개발
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 db/migrations/0336_safe_ma_gnuci.sql | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 db/migrations/0336_safe_ma_gnuci.sql

(limited to 'db/migrations/0336_safe_ma_gnuci.sql')

diff --git a/db/migrations/0336_safe_ma_gnuci.sql b/db/migrations/0336_safe_ma_gnuci.sql
new file mode 100644
index 00000000..e7a44f0f
--- /dev/null
+++ b/db/migrations/0336_safe_ma_gnuci.sql
@@ -0,0 +1,8 @@
+DROP VIEW "public"."material_search_view";--> statement-breakpoint
+ALTER TABLE "biddings" ADD COLUMN "ANFNR" varchar(50);--> statement-breakpoint
+CREATE VIEW "public"."material_search_view" AS (select "mdg"."MATERIAL_MASTER_PART_MATL"."MATKL" as "material_group_code", "mdg"."MATERIAL_MASTER_PART_MATL_CHARASGN"."ATWTB" as "material_group_desc", COALESCE("mdg"."MATERIAL_MASTER_PART_MATL"."MATKL", '') || ' - ' || COALESCE("mdg"."MATERIAL_MASTER_PART_MATL_CHARASGN"."ATWTB", '') as "display_text" from "mdg"."MATERIAL_MASTER_PART_MATL" inner join "mdg"."MATERIAL_MASTER_PART_MATL_CHARASGN" on "mdg"."MATERIAL_MASTER_PART_MATL"."MATNR" = "mdg"."MATERIAL_MASTER_PART_MATL_CHARASGN"."MATNR" where 
+      "mdg"."MATERIAL_MASTER_PART_MATL"."MATKL" IS NOT NULL 
+      AND "mdg"."MATERIAL_MASTER_PART_MATL"."MATKL" != ''
+      AND "mdg"."MATERIAL_MASTER_PART_MATL_CHARASGN"."ATWTB" IS NOT NULL 
+      AND "mdg"."MATERIAL_MASTER_PART_MATL_CHARASGN"."ATWTB" != ''
+     group by "mdg"."MATERIAL_MASTER_PART_MATL"."MATKL", "mdg"."MATERIAL_MASTER_PART_MATL_CHARASGN"."ATWTB" order by "mdg"."MATERIAL_MASTER_PART_MATL"."MATKL", "mdg"."MATERIAL_MASTER_PART_MATL_CHARASGN"."ATWTB");
\ No newline at end of file
-- 
cgit v1.2.3

