/**Begin D:\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_RPTADJUSTDATA' AND KSQL_COL_NAME IN ('FOLAPORG')) 
 ALTER TABLE T_BCM_RPTADJUSTDATA ADD (FOLAPORG VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ADJUSTUPDATESTATUS') 
 CREATE TABLE T_BCM_ADJUSTUPDATESTATUS (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELLD BIGINT DEFAULT 0 NOT NULL,
FSCENEID BIGINT DEFAULT 0 NOT NULL,
FYEARID BIGINT DEFAULT 0 NOT NULL,
FPERIODID BIGINT DEFAULT 0 NOT NULL,
FSTATUS CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_USERSELECTREPORT') 
 CREATE TABLE T_BCM_USERSELECTREPORT (
FID BIGINT DEFAULT 0 NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FUSER BIGINT DEFAULT 0 NOT NULL,
FJSONDATA NCLOB,
FCREATEDATE DATETIME,
FMODIFYDATE DATETIME
);



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