 alter table fac_loan_details
Add column open_bank varchar(128);

 alter table fac_loan_details
Add column card_no varchar(128);

 alter table fac_loan_details
Add column bank_serial_no varchar(128);

 alter table fac_loan_details
Add column bank_loan_time varchar(24);

COMMENT ON COLUMN fac_loan_details.open_bank IS '银行卡对应的银行名称；如果为支付宝和微信赋值支付宝和微信';
COMMENT ON COLUMN fac_loan_details.card_no IS '放款银行卡号';
COMMENT ON COLUMN fac_loan_details.bank_serial_no IS '放款支付流水号:按照清分机构统一规则形成的每笔交易编号（付款机构、清算机构、收款机构可核对交易明细）';
COMMENT ON COLUMN fac_loan_details.bank_loan_time IS '放款成功时间:贷款资金转至借款人指定账务的具体时间';




 alter table pls_repay_plan_detail
Add column repay_time  varchar(24);

 alter table pls_repay_plan_detail
Add column repay_req_no varchar(128);

 alter table pls_repay_plan_detail
Add column repay_card_name varchar(256);

 alter table pls_repay_plan_detail
Add column repay_trade_type varchar(24);

COMMENT ON COLUMN pls_repay_plan_detail.repay_time IS '扣款成功时间-本息从借款人账户划出时间，精确到时分秒';
COMMENT ON COLUMN pls_repay_plan_detail.repay_req_no IS '还款支付流水号-按照清算机构统一规则形成的每笔交易编号（付款机构、清算机构、收款机构可核对的交易明细）';
COMMENT ON COLUMN pls_repay_plan_detail.repay_card_name IS '还款账号对应的开户行名称-还款银行卡号对应的银行名称，支付宝和微信还款对应支付宝和微信';
COMMENT ON COLUMN pls_repay_plan_detail.repay_trade_type IS '还款交易类型:online_cash_repay线上现金还款,non_cash_repay非现金还款,offline_cash_repay线下现金还款';


insert into rec_msxf_loan_his (select * from rec_msxf_loan_tmp);
delete from rec_msxf_loan_tmp;

 alter table "rec_msxf_loan_tmp"
Add column open_bank varchar(128) not null;

 alter table rec_msxf_loan_tmp
Add column card_no varchar(128) not null;

 alter table rec_msxf_loan_tmp
Add column bank_serial_no varchar(256) not null;

 alter table rec_msxf_loan_tmp
Add column bank_loan_time varchar(24) not null;

COMMENT ON COLUMN rec_msxf_loan_tmp.open_bank IS '银行卡对应的银行名称；如果为支付宝和微信赋值支付宝和微信';
COMMENT ON COLUMN rec_msxf_loan_tmp.card_no IS '放款银行卡号';
COMMENT ON COLUMN rec_msxf_loan_tmp.bank_serial_no IS '放款支付流水号:按照清分机构统一规则形成的每笔交易编号（付款机构、清算机构、收款机构可核对交易明细）';
COMMENT ON COLUMN rec_msxf_loan_tmp.bank_loan_time IS '放款成功时间:贷款资金转至借款人指定账务的具体时间';

 alter table "rec_msxf_loan_his"
Add column open_bank varchar(128);

 alter table rec_msxf_loan_his
Add column card_no varchar(128);

 alter table rec_msxf_loan_his
Add column bank_serial_no varchar(256);

 alter table rec_msxf_loan_his
Add column bank_loan_time varchar(24);

COMMENT ON COLUMN rec_msxf_loan_his.open_bank IS '银行卡对应的银行名称；如果为支付宝和微信赋值支付宝和微信';
COMMENT ON COLUMN rec_msxf_loan_his.card_no IS '放款银行卡号';
COMMENT ON COLUMN rec_msxf_loan_his.bank_serial_no IS '放款支付流水号:按照清分机构统一规则形成的每笔交易编号（付款机构、清算机构、收款机构可核对交易明细）';
COMMENT ON COLUMN rec_msxf_loan_his.bank_loan_time IS '放款成功时间:贷款资金转至借款人指定账务的具体时间';

insert into rec_msxf_repay_his (select * from rec_msxf_repay_tmp);
delete from rec_msxf_repay_tmp;

 alter table "rec_msxf_repay_tmp"
Add column repay_time  varchar(24) not null;

 alter table rec_msxf_repay_tmp
Add column repay_req_no varchar(128) not null;

 alter table rec_msxf_repay_tmp
Add column repay_card_name varchar(256) not null;

 alter table rec_msxf_repay_tmp
Add column repay_trade_type varchar(24) not null;

COMMENT ON COLUMN rec_msxf_repay_tmp.repay_time IS '扣款成功时间-本息从借款人账户划出时间，精确到时分秒';
COMMENT ON COLUMN rec_msxf_repay_tmp.repay_req_no IS '还款支付流水号-按照清算机构统一规则形成的每笔交易编号（付款机构、清算机构、收款机构可核对的交易明细）';
COMMENT ON COLUMN rec_msxf_repay_tmp.repay_card_name IS '还款账号对应的开户行名称-还款银行卡号对应的银行名称，支付宝和微信还款对应支付宝和微信';
COMMENT ON COLUMN rec_msxf_repay_tmp.repay_trade_type IS '还款交易类型:online_cash_repay线上现金还款,non_cash_repay非现金还款,offline_cash_repay线下现金还款';




 alter table "rec_msxf_repay_his"
Add column repay_time  varchar(24);

 alter table rec_msxf_repay_his
Add column repay_req_no varchar(128);

 alter table rec_msxf_repay_his
Add column repay_card_name varchar(256);

 alter table rec_msxf_repay_his
Add column repay_trade_type varchar(24);

COMMENT ON COLUMN rec_msxf_repay_his.repay_time IS '扣款成功时间-本息从借款人账户划出时间，精确到时分秒';
COMMENT ON COLUMN rec_msxf_repay_his.repay_req_no IS '还款支付流水号-按照清算机构统一规则形成的每笔交易编号（付款机构、清算机构、收款机构可核对的交易明细）';
COMMENT ON COLUMN rec_msxf_repay_his.repay_card_name IS '还款账号对应的开户行名称-还款银行卡号对应的银行名称，支付宝和微信还款对应支付宝和微信';
COMMENT ON COLUMN rec_msxf_repay_his.repay_trade_type IS '还款交易类型:online_cash_repay线上现金还款,non_cash_repay非现金还款,offline_cash_repay线下现金还款';



ALTER  TABLE "fac_loan_duebill" add cust_rate varchar(24);
ALTER  TABLE "fac_loan_duebill_back" add cust_rate varchar(24);
COMMENT ON COLUMN fac_loan_duebill.cust_rate IS '对客利率';
COMMENT ON COLUMN fac_loan_duebill_back.cust_rate IS '对客利率';