/**Begin D:\PDM_UPGRADE\PDM1\BEI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_SERVICECONFIG' AND KSQL_COL_NAME IN ('FSERVERADDRESS2')) 
 ALTER TABLE T_BEI_SERVICECONFIG ADD (FSERVERADDRESS2 VARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_SERVICECONFIG' AND KSQL_COL_NAME IN ('FCONNECTSTATUS2')) 
 ALTER TABLE T_BEI_SERVICECONFIG ADD (FCONNECTSTATUS2 CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_SERVICECONFIG' AND KSQL_COL_NAME IN ('FISENABLE')) 
 ALTER TABLE T_BEI_SERVICECONFIG ADD (FISENABLE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_SERVICECONFIG' AND KSQL_COL_NAME IN ('FISENABLE2')) 
 ALTER TABLE T_BEI_SERVICECONFIG ADD (FISENABLE2 CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BEI_APPSCOPEENTITY') 
 CREATE TABLE T_BEI_APPSCOPEENTITY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FEBANKCGNO BIGINT DEFAULT 0 NOT NULL,
FELASTUPDATER BIGINT DEFAULT 0 NOT NULL,
FELASTUPDATE DATETIME
);
/**End D:\PDM_UPGRADE\PDM1\BEI_table.sql **/
