/**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_MGSRCENTRY' AND KSQL_COL_NAME ='FPLANSCOPEID') 
 ALTER TABLE T_POM_MGSRCENTRY ADD (FPLANSCOPEID BIGINT DEFAULT 0 NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MGSRCENTRY' AND KSQL_COL_NAME ='FSUPPLYRULE') 
 ALTER TABLE T_POM_MGSRCENTRY ADD (FSUPPLYRULE NVARCHAR(1) DEFAULT ' ' NOT NULL);
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MGTARENTRY' AND KSQL_COL_NAME ='FPLANSCOPEMGID') 
 ALTER TABLE T_POM_MGTARENTRY ADD (FPLANSCOPEMGID BIGINT DEFAULT 0 NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MGTARENTRY' AND KSQL_COL_NAME ='FSUPPLYRULEMG') 
 ALTER TABLE T_POM_MGTARENTRY ADD (FSUPPLYRULEMG NVARCHAR(1) DEFAULT ' ' NOT NULL);

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