summaryrefslogtreecommitdiff
path: root/db/migrations/0336_safe_ma_gnuci.sql
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-09-09 10:34:05 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-09-09 10:34:05 +0000
commit86b1fd1cc801f45642f84d24c0b5c84368454ff0 (patch)
tree63176d1feb6d3fbbb71d942343056ba6d793b586 /db/migrations/0336_safe_ma_gnuci.sql
parentc62ec046327fd388ebce04571b55910747e69a3b (diff)
(최겸) 구매 입찰 사전견적, 입찰, 낙찰, 유찰, 재입찰 기능 개발
Diffstat (limited to 'db/migrations/0336_safe_ma_gnuci.sql')
-rw-r--r--db/migrations/0336_safe_ma_gnuci.sql8
1 files changed, 8 insertions, 0 deletions
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