/**Begin D:\PDM_UPGRADE\PDM1\FPM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORT_L' AND KSQL_COL_NAME IN ('FNAME'))
ALTER TABLE T_FPM_REPORT_L ADD (FNAME VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTPLANSUM' AND KSQL_COL_NAME IN ('FENABLE'))
ALTER TABLE T_FPM_REPORTPLANSUM ADD (FENABLE CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTPLANSUM' AND KSQL_COL_NAME IN ('FSTATUS'))
ALTER TABLE T_FPM_REPORTPLANSUM ADD (FSTATUS NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTPLANSUM' AND KSQL_COL_NAME IN ('FMASTERID'))
ALTER TABLE T_FPM_REPORTPLANSUM ADD (FMASTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTPLANSUM' AND KSQL_COL_NAME IN ('FISEXECBIASANALYS'))
ALTER TABLE T_FPM_REPORTPLANSUM ADD (FISEXECBIASANALYS CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTPLANSUM_L' AND KSQL_COL_NAME IN ('FNAME'))
ALTER TABLE T_FPM_REPORTPLANSUM_L ADD (FNAME VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORT' AND KSQL_COL_NAME IN ('FENABLE'))
ALTER TABLE T_FPM_REPORT ADD (FENABLE CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORT' AND KSQL_COL_NAME IN ('FSTATUS'))
ALTER TABLE T_FPM_REPORT ADD (FSTATUS NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORT' AND KSQL_COL_NAME IN ('FMASTERID'))
ALTER TABLE T_FPM_REPORT ADD (FMASTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORT' AND KSQL_COL_NAME IN ('FISEXECBIASANALYS'))
ALTER TABLE T_FPM_REPORT ADD (FISEXECBIASANALYS CHAR(1) DEFAULT '0' NOT NULL );

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