From 523b64fe6634aba9bdb8e528f7d53a6d054d98cb Mon Sep 17 00:00:00 2001 From: hanxueda Date: Tue, 23 Apr 2019 13:21:49 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A7=AF=E5=88=86][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=A7=AF=E5=88=86=E6=B7=BB=E5=8A=A0=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC0=20SQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V201904231317__ADD_DEFAULT_ZERO_CREDIT.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201904231317__ADD_DEFAULT_ZERO_CREDIT.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201904231317__ADD_DEFAULT_ZERO_CREDIT.sql b/mallinkAdmin/src/main/resources/db/migration/V201904231317__ADD_DEFAULT_ZERO_CREDIT.sql new file mode 100644 index 000000000..dadfb4bfc --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201904231317__ADD_DEFAULT_ZERO_CREDIT.sql @@ -0,0 +1,4 @@ +alter table wx_c_user_basic_info alter column credit set default 0; +alter table wx_c_user alter column credit set default 0; +update wx_c_user_basic_info set credit = 0 where credit is null; +update wx_c_user set credit = 0 where credit is null; \ No newline at end of file