/**Begin D:\PDM_UPGRADE\PDM1\MSPLAN_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CHANGE_RECORD' AND KSQL_COL_NAME ='F_S_WAREHOUSE')
 ALTER TABLE T_MSPLAN_CHANGE_RECORD ADD (F_S_WAREHOUSE BIGINT DEFAULT 0 NOT NULL );

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

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

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

/**End D:\PDM_UPGRADE\PDM1\MSPLAN_table.sql **/
