/**Begin D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_REPORTVERSION') 
 CREATE TABLE T_BCM_REPORTVERSION (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FENTITYID BIGINT DEFAULT 0 NOT NULL,
FSCENEID BIGINT DEFAULT 0 NOT NULL,
FYEARID BIGINT DEFAULT 0 NOT NULL,
FPERIODID BIGINT DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FVERSIONNUMBER CHAR(1) DEFAULT '1' NOT NULL,
FVERSIONNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDATA NCLOB,
FSPREADJSON NCLOB,
FCREATERID BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_REPORTVERSION_L') 
 CREATE TABLE T_BCM_REPORTVERSION_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FVERSIONNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);



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