/**Begin D:\PDM_UPGRADE\PDM1\BOS_table.sql **/
-- 数币专题-银行账户新增字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_ACCOUNTBANKS_A' AND KSQL_COL_NAME IN ('FISELECPAYMENT')) 
 ALTER TABLE T_BD_ACCOUNTBANKS_A ADD (FISELECPAYMENT CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_ACCOUNTBANKS_A' AND KSQL_COL_NAME IN ('FELECPAYMENTTYPE')) 
 ALTER TABLE T_BD_ACCOUNTBANKS_A ADD (FELECPAYMENTTYPE NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_ACCOUNTBANKS_A' AND KSQL_COL_NAME IN ('FELECPAYMENTLEVEL')) 
 ALTER TABLE T_BD_ACCOUNTBANKS_A ADD (FELECPAYMENTLEVEL NVARCHAR(80) DEFAULT ' ' NOT NULL );
-- 数币专题-银行类别新增字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_BANKCGSETTING' AND KSQL_COL_NAME IN ('FINSTITUTIONCODE')) 
 ALTER TABLE T_BD_BANKCGSETTING ADD (FINSTITUTIONCODE NVARCHAR(30) DEFAULT ' ' NOT NULL );
-- 银行账户-数币钱包关联结算账户表
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_ACCOUNTBANKS_EP') 
 CREATE TABLE T_BD_ACCOUNTBANKS_EP (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);

/**End D:\PDM_UPGRADE\PDM1\BOS_table.sql **/
