mirror of
https://github.com/zfile-dev/zfile.git
synced 2025-04-19 05:34:52 +00:00
🐛 修复直链下载日志表中 ip 字段长度不足矣存储 ipv6 的 问题
This commit is contained in:
@@ -0,0 +1 @@
|
||||
alter table download_log modify ip varchar(64) null comment '访问 ip';
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user