-- 生产补料单增加字段生产领域、生产线字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_MREQOUTBILL' AND KSQL_COL_NAME IN ('FPRODUCTIONDOMAIN'))
ALTER TABLE T_IM_MDC_MREQOUTBILL ADD (FPRODUCTIONDOMAIN NVARCHAR(5) DEFAULT ' ' NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_MQBENTRY' AND KSQL_COL_NAME IN ('FPRODUCTLINE'))
ALTER TABLE T_IM_MDC_MQBENTRY ADD (FPRODUCTLINE BIGINT DEFAULT 0 NOT NULL);