/**Begin D:\PDM_UPGRADE\PDM1\BCM_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_REPORT' AND KSQL_COL_NAME IN ('FDESCRIPTION')) 
 ALTER TABLE T_BCM_REPORT ADD (FDESCRIPTION NVARCHAR(600) DEFAULT ' ' NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_REPORTLIST' AND KSQL_COL_NAME IN ('FDESCRIPTION')) 
 ALTER TABLE T_BCM_REPORTLIST ADD (FDESCRIPTION NVARCHAR(600) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_RPTDESCRIPTION')
 CREATE TABLE T_BCM_RPTDESCRIPTION (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FREPORTID BIGINT DEFAULT 0 NOT NULL,
FEXCUTEACTION CHAR(1) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(600) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME
);

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