--查询实体ES同步配置, 增加字段 FQUERYENTITY
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_ENTITYESCONFIG' AND KSQL_COL_NAME ='FQUERYENTITY') 
 ALTER TABLE T_HBSS_ENTITYESCONFIG ADD (FQUERYENTITY NVARCHAR(50) DEFAULT '' NOT NULL );
 
 
-- T_HBSS_ENTITYRELEASEINFO 字段类型长度默认值更改
EXEC p_AlterColumn 'T_HBSS_ENTITYRELEASEINFO', 'FQUERYENTITYNAME', 'VARCHAR(50)', 'NOT NULL', '1111',  ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYRELEASEINFO', 'FDATASOURCETYPE', 'VARCHAR(10)', 'NOT NULL', '1111',  ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYRELEASEINFO', 'FKSQLQUERYTYPE', 'VARCHAR(20)', 'NOT NULL', '1111',  ''' ''';
 
 
-- T_HBSS_ENTITYESCONFIG 字段类型长度默认值更改
EXEC p_AlterColumn 'T_HBSS_ENTITYESCONFIG', 'FQUERYENTITY', 'VARCHAR(50)', 'NOT NULL', '1111',  ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYESCONFIG', 'FONETOMANYENTITY', 'VARCHAR(50)', 'NOT NULL', '1111',  ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYESCONFIG', 'FMANYTOONEENTITY', 'VARCHAR(50)', 'NOT NULL', '1111',  ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYESCONFIG', 'FRELATIONTYPE', 'VARCHAR(20)', 'NOT NULL', '1111', ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYESCONFIG', 'FSYNCMODE', 'VARCHAR(20)', 'NOT NULL', '1111',  ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYESCONFIG', 'FSTATUS', 'VARCHAR(20)', 'NOT NULL', '1111',  ''' ''';

-- T_HBSS_ENTITYSYNCCONFIG 字段类型长度默认值更改
EXEC p_AlterColumn 'T_HBSS_ENTITYSYNCCONFIG', 'FENTITY', 'VARCHAR(36)', 'NOT NULL', '1111',  ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYSYNCCONFIG', 'FSERVICENAME', 'VARCHAR(50)', 'NOT NULL', '1111', ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYSYNCCONFIG', 'FMETHODNAME', 'VARCHAR(50)', 'NOT NULL', '1111',  ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYSYNCCONFIG', 'FAPP', 'VARCHAR(36)', 'NOT NULL', '1111',  ''' ''';
EXEC p_AlterColumn 'T_HBSS_ENTITYSYNCCONFIG', 'FSTATUS', 'VARCHAR(20)', 'NOT NULL', '1111',  ''' ''';




