
-- 完工入库新增生产部门字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_PRBLENTRY_M' AND KSQL_COL_NAME ='FPRODUCEDEPT') 
 ALTER TABLE T_IM_MDC_PRBLENTRY_M ADD (FPRODUCEDEPT BIGINT DEFAULT 0 NOT NULL);