/**Begin D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_DI_SCHEMECOLLECTLOG') 
 CREATE TABLE T_DI_SCHEMECOLLECTLOG (
FID BIGINT DEFAULT 0 NOT NULL,
FCOLLECTTIME DATETIME,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FCOLLECTOR BIGINT DEFAULT 0 NOT NULL,
FSCENARIOID BIGINT DEFAULT 0 NOT NULL,
FPERIODID BIGINT DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FCOLLECTORSTATE CHAR(1) DEFAULT '1' NOT NULL,
FYEARID BIGINT DEFAULT 0 NOT NULL,
FSTEP CHAR(1) DEFAULT ' ' NOT NULL,
FIMPMODE CHAR(1) DEFAULT '1' NOT NULL,
FIMPMODEDIMMEM VARCHAR(200) DEFAULT ' ' NOT NULL,
FSPEND VARCHAR(32) DEFAULT ' ' NOT NULL,
FEXECUTERECID BIGINT DEFAULT 0 NOT NULL,
FSCHEMEPARAM VARCHAR(500) DEFAULT ' ' NOT NULL,
FRESULT VARCHAR(100) DEFAULT ' ' NOT NULL,
FSCHEMEVERSION VARCHAR(50) DEFAULT ' ' NOT NULL,
FERROR NCLOB,
FSCHEMENAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCLEARCONFIG NCLOB,
FSCHEMENUMBER VARCHAR(50) DEFAULT ' ' NOT NULL
);


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

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