From 97cf97bbec32c84db07d53d2762c056a3e1b1d01 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 25 Oct 2019 12:41:33 +0800 Subject: [PATCH] =?UTF-8?q?[sql[=E4=BF=AE=E6=94=B9][=E8=B4=A6=E5=8D=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5=E9=BB=98=E8=AE=A4=E5=80=BC?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/V201910251200__G_BILL_ALTER.sql | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201910251200__G_BILL_ALTER.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201910251200__G_BILL_ALTER.sql b/mallinkAdmin/src/main/resources/db/migration/V201910251200__G_BILL_ALTER.sql new file mode 100644 index 000000000..48536179b --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201910251200__G_BILL_ALTER.sql @@ -0,0 +1,64 @@ + +update wx_bill_rent set receive_pay = 0 where receive_pay is null; +update wx_bill_rent set need_pay = 0 where need_pay is null; +update wx_bill_rent set pay = 0 where pay is null; +update wx_bill_rent set owe = 0 where owe is null; + +alter table wx_bill_rent modify column receive_pay bigint(12) not null default 0 comment '实际应收', +modify column need_pay bigint(12) not null default 0 comment '应收', +modify column pay bigint(12) not null default 0 comment '已付', +modify column owe bigint(12) not null default 0 comment '欠缴'; + +update wx_bill_property set receive_pay = 0 where receive_pay is null; +update wx_bill_property set need_pay = 0 where need_pay is null; +update wx_bill_property set pay = 0 where pay is null; +update wx_bill_property set owe = 0 where owe is null; + +alter table wx_bill_property modify column receive_pay bigint(12) not null default 0 comment '实际应收', +modify column need_pay bigint(12) not null default 0 comment '应收', +modify column pay bigint(12) not null default 0 comment '已付', +modify column owe bigint(12) not null default 0 comment '欠缴'; + +update wx_bill_rent_deposit set receive_pay = 0 where receive_pay is null; +update wx_bill_rent_deposit set need_pay = 0 where need_pay is null; +update wx_bill_rent_deposit set pay = 0 where pay is null; +update wx_bill_rent_deposit set owe = 0 where owe is null; + +alter table wx_bill_rent_deposit modify column receive_pay bigint(12) not null default 0 comment '实际应收', +modify column need_pay bigint(12) not null default 0 comment '应收', +modify column pay bigint(12) not null default 0 comment '已付', +modify column owe bigint(12) not null default 0 comment '欠缴'; + +update wx_bill_property_deposit set receive_pay = 0 where receive_pay is null; +update wx_bill_property_deposit set need_pay = 0 where need_pay is null; +update wx_bill_property_deposit set pay = 0 where pay is null; +update wx_bill_property_deposit set owe = 0 where owe is null; + +alter table wx_bill_property_deposit modify column receive_pay bigint(12) not null default 0 comment '实际应收', +modify column need_pay bigint(12) not null default 0 comment '应收', +modify column pay bigint(12) not null default 0 comment '已付', +modify column owe bigint(12) not null default 0 comment '欠缴'; + +update wx_bill_daily set receive_pay = 0 where receive_pay is null; +update wx_bill_daily set pay = 0 where pay is null; +update wx_bill_daily set owe = 0 where owe is null; + +alter table wx_bill_daily modify column receive_pay bigint(12) not null default 0 comment '实际应收', +modify column pay bigint(12) not null default 0 comment '已付', +modify column owe bigint(12) not null default 0 comment '欠缴'; + +update wx_bill_other set receive_pay = 0 where receive_pay is null; +update wx_bill_other set pay = 0 where pay is null; +update wx_bill_other set owe = 0 where owe is null; + +alter table wx_bill_other modify column receive_pay bigint(12) not null default 0 comment '实际应收', +modify column pay bigint(12) not null default 0 comment '已付', +modify column owe bigint(12) not null default 0 comment '欠缴'; + +update wx_bill_other_deposit set receive_pay = 0 where receive_pay is null; +update wx_bill_other_deposit set pay = 0 where pay is null; +update wx_bill_other_deposit set owe = 0 where owe is null; + +alter table wx_bill_other_deposit modify column receive_pay bigint(12) not null default 0 comment '实际应收', +modify column pay bigint(12) not null default 0 comment '已付', +modify column owe bigint(12) not null default 0 comment '欠缴'; \ No newline at end of file