/**Begin D:\PDM_UPGRADE\PDM1\FPM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TASK_RECORD' AND KSQL_COL_NAME IN ('FOBJECTID'))
ALTER TABLE T_FPM_TASK_RECORD ADD (FOBJECTID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TASK_RECORD' AND KSQL_COL_NAME IN ('FOBJECTENTITYNUMBER'))
ALTER TABLE T_FPM_TASK_RECORD ADD (FOBJECTENTITYNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TASK_RECORD' AND KSQL_COL_NAME IN ('FACTEXECUTETRACEID'))
ALTER TABLE T_FPM_TASK_RECORD ADD (FACTEXECUTETRACEID NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TASK_RECORD' AND KSQL_COL_NAME IN ('FEXECUTETASKID'))
ALTER TABLE T_FPM_TASK_RECORD ADD (FEXECUTETASKID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TASK_RECORD' AND KSQL_COL_NAME IN ('FRETRY'))
ALTER TABLE T_FPM_TASK_RECORD ADD (FRETRY INT DEFAULT 0 NOT NULL );

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