--生产工单、工单变更单增加 初始化单据 字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDER' AND KSQL_COL_NAME ='FISINITBILL') 
ALTER TABLE T_POM_MFTORDER ADD (FISINITBILL CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMFTORDER' AND KSQL_COL_NAME ='FISINITBILL') 
ALTER TABLE T_POM_XMFTORDER ADD (FISINITBILL CHAR(1) DEFAULT '0' NOT NULL );

--生产组件清单、变更单增加 初始化单据 字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY_S' AND KSQL_COL_NAME ='FISINITBILL') 
ALTER TABLE T_POM_MFTORDERENTRY_S ADD (FISINITBILL CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMFTORDERENTRY_S' AND KSQL_COL_NAME ='FISINITBILL') 
ALTER TABLE T_POM_XMFTORDERENTRY_S ADD (FISINITBILL CHAR(1) DEFAULT '0' NOT NULL );

