--查询实体上线信息表, 配置KSQL,AGLO,ES方案
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_ENTITYRELEASEINFO')
 CREATE TABLE T_HBSS_ENTITYRELEASEINFO (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FQUERYENTITYNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDATASOURCETYPE NVARCHAR(10) DEFAULT ' ' NOT NULL,
FKSQLQUERYTYPE NVARCHAR(20) DEFAULT ' ' NOT NULL,
FKSQLUSEUNION CHAR(1) DEFAULT '0' NOT NULL
);

--ES同步方案配置表
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_ENTITYSYNCCONFIG')
 CREATE TABLE T_HBSS_ENTITYSYNCCONFIG (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FENTITY NVARCHAR(36) DEFAULT ' ' NOT NULL,
FSERVICENAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMETHODNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FAPP NVARCHAR(36) DEFAULT ' ' NOT NULL,
FFIXEDIMPORTDATATIME DATETIME,
FRELATIONTYPE NVARCHAR(20) DEFAULT ' ' NOT NULL,
FSYNCMODE NVARCHAR(20) DEFAULT ' ' NOT NULL,
FSTATUS NVARCHAR(20) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_ENTITYESCONFIG')
 CREATE TABLE T_HBSS_ENTITYESCONFIG (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FQUERYENTITYNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FVERSION BIGINT DEFAULT 0 NOT NULL,
FONETOMANYENTITY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMANYTOONEENTITY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FESSYNCTIME DATETIME,
FFIXEDIMPORTDATATIME DATETIME,
FRELATIONTYPE NVARCHAR(20) DEFAULT ' ' NOT NULL,
FSYNCMODE NVARCHAR(20) DEFAULT ' ' NOT NULL,
FSTATUS NVARCHAR(20) DEFAULT ' ' NOT NULL
);
