调整数据库 node.isp 类型

This commit is contained in:
2025-04-12 11:21:18 +08:00
parent 636bdcdb87
commit ca6e160bef
3 changed files with 9 additions and 12 deletions

View File

@@ -21,10 +21,11 @@
中间件:
- [ ] CORS
- [ ] Limiter
- [ ] Compress
检查数据库枚举字段0 值只作为空值使用
实现开发时迁移脚本:
- 检查 sql 注释
- 执行迁移

View File

@@ -1,11 +1,7 @@
package main
import (
"platform/web/services"
)
func main() {
for range 12 {
println(services.ID.GenReadable("res"))
}
println(rune('\r'))
println(rune('\n'))
println(rune('|'))
}

View File

@@ -427,7 +427,7 @@ create table node (
version int not null,
name varchar(255) not null unique,
host varchar(255) not null,
isp varchar(255) not null,
isp int not null,
prov varchar(255) not null,
city varchar(255) not null,
proxy_id int references proxy (id)
@@ -453,7 +453,7 @@ comment on column node.id is '节点ID';
comment on column node.version is '节点版本';
comment on column node.name is '节点名称';
comment on column node.host is '节点地址';
comment on column node.isp is '运营商';
comment on column node.isp is '运营商0-其他1-电信2-联通3-移动';
comment on column node.prov is '省份';
comment on column node.city is '城市';
comment on column node.proxy_id is '代理ID';
@@ -508,7 +508,7 @@ create table channel (
proxy_host varchar(255) not null default '',
proxy_port int not null,
node_host varchar(255),
protocol varchar(255),
protocol int,
auth_ip bool not null default false,
user_host varchar(255),
auth_pass bool not null default false,
@@ -543,7 +543,7 @@ comment on column channel.proxy_port is '转发端口';
comment on column channel.node_host is '节点地址';
comment on column channel.auth_ip is 'IP认证';
comment on column channel.auth_pass is '密码认证';
comment on column channel.protocol is '协议';
comment on column channel.protocol is '协议类型1-http2-https3-socks5';
comment on column channel.username is '用户名';
comment on column channel.password is '密码';
comment on column channel.expiration is '过期时间';