/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_table.sql **/

 --工单汇报分录
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_pom_mftreportsummary' AND KSQL_COL_NAME ='FLOTID') 
 ALTER TABLE t_pom_mftreportsummary ADD (FLOTID BIGINT DEFAULT 0 NOT NULL );
 
 --组件清单分录
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_pom_manustockentry' AND KSQL_COL_NAME ='FLOTID') 
 ALTER TABLE t_pom_manustockentry ADD (FLOTID BIGINT DEFAULT 0 NOT NULL );
 
 --组件清单变更单分录
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_pom_xmanustockentry' AND KSQL_COL_NAME ='FLOTID') 
 ALTER TABLE t_pom_xmanustockentry ADD (FLOTID BIGINT DEFAULT 0 NOT NULL );
 
 --工单分录
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_pom_mftorderentry' AND KSQL_COL_NAME ='FLOTID') 
 ALTER TABLE t_pom_mftorderentry ADD (FLOTID BIGINT DEFAULT 0 NOT NULL );
 
 --工单变更单分录
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_pom_xmftorderentry_e' AND KSQL_COL_NAME ='FLOTID') 
 ALTER TABLE t_pom_xmftorderentry_e ADD (FLOTID BIGINT DEFAULT 0 NOT NULL );
 
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_table.sql **/
