From 28150b0c1a2e8d709428fcebe5d056197df6ace2 Mon Sep 17 00:00:00 2001 From: zhaojun <873019219@qq.com> Date: Wed, 13 Jul 2022 11:06:29 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E7=9B=B4=E9=93=BE?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=97=A5=E5=BF=97=E8=A1=A8=E4=B8=AD=20ip=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E9=95=BF=E5=BA=A6=E4=B8=8D=E8=B6=B3=E7=9F=A3?= =?UTF-8?q?=E5=AD=98=E5=82=A8=20ipv6=20=E7=9A=84=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4__download_log_modify_ip_field_length.sql | 1 + ...4__download_log_modify_ip_field_length.sql | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/main/resources/db/migration-mysql/V4__download_log_modify_ip_field_length.sql create mode 100644 src/main/resources/db/migration-sqlite/V4__download_log_modify_ip_field_length.sql diff --git a/src/main/resources/db/migration-mysql/V4__download_log_modify_ip_field_length.sql b/src/main/resources/db/migration-mysql/V4__download_log_modify_ip_field_length.sql new file mode 100644 index 0000000..ef2b706 --- /dev/null +++ b/src/main/resources/db/migration-mysql/V4__download_log_modify_ip_field_length.sql @@ -0,0 +1 @@ +alter table download_log modify ip varchar(64) null comment '访问 ip'; \ No newline at end of file diff --git a/src/main/resources/db/migration-sqlite/V4__download_log_modify_ip_field_length.sql b/src/main/resources/db/migration-sqlite/V4__download_log_modify_ip_field_length.sql new file mode 100644 index 0000000..37f45c5 --- /dev/null +++ b/src/main/resources/db/migration-sqlite/V4__download_log_modify_ip_field_length.sql @@ -0,0 +1,28 @@ +create table download_log_dg_tmp +( + id integer + primary key autoincrement, + path text, + storage_key varchar(64), + create_time datetime, + ip varchar(64), + user_agent varchar(2048), + referer varchar(2048), + short_key varchar(255) +); + +insert into download_log_dg_tmp(id, path, storage_key, create_time, ip, user_agent, referer, short_key) +select id, + path, + storage_key, + create_time, + ip, + user_agent, + referer, + short_key +from download_log; + +drop table download_log; + +alter table download_log_dg_tmp + rename to download_log; \ No newline at end of file