/**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_MSPLAN_SYNCSETTINGS' AND KSQL_COL_NAME ='FCREATERFIELD')
 ALTER TABLE T_MSPLAN_SYNCSETTINGS ADD (FCREATERFIELD BIGINT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_SYNCSETTINGS' AND KSQL_COL_NAME ='FCREATEDATEFIELD')
 ALTER TABLE T_MSPLAN_SYNCSETTINGS ADD (FCREATEDATEFIELD DATETIME );

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

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_SYNCSETTINGS' AND KSQL_COL_NAME ='FMODIFYDATEFIELD')
 ALTER TABLE T_MSPLAN_SYNCSETTINGS ADD (FMODIFYDATEFIELD DATETIME );

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