-- 完工入库单增加字段生产领域、生产线字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_PRODUCTINBILL' AND KSQL_COL_NAME IN ('FPRODUCTIONDOMAIN'))
ALTER TABLE T_IM_MDC_PRODUCTINBILL ADD (FPRODUCTIONDOMAIN NVARCHAR(5) DEFAULT ' ' NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_PRBLENTRY' AND KSQL_COL_NAME IN ('FPRODUCTLINEID'))
ALTER TABLE T_IM_MDC_PRBLENTRY ADD (FPRODUCTLINEID BIGINT DEFAULT 0 NOT NULL);