/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MRP_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_REPLACE_LOG' AND KSQL_COL_NAME ='FREPAUXPTY')
 ALTER TABLE T_MRP_REPLACE_LOG ADD (FREPAUXPTY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_REPLACE_LOG' AND KSQL_COL_NAME ='FAUXPTY')
 ALTER TABLE T_MRP_REPLACE_LOG ADD (FAUXPTY BIGINT DEFAULT 0 NOT NULL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_REP_LOG_R_ENTRY' AND KSQL_COL_NAME ='FENTRYAUXPTY')
 ALTER TABLE T_MRP_REP_LOG_R_ENTRY ADD (FENTRYAUXPTY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_REP_LOG_M_ENTRY' AND KSQL_COL_NAME ='FENTRYAUXPTY')
 ALTER TABLE T_MRP_REP_LOG_M_ENTRY ADD (FENTRYAUXPTY BIGINT DEFAULT 0 NOT NULL );

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