调整数据库 node.isp 类型
This commit is contained in:
@@ -21,10 +21,11 @@
|
|||||||
|
|
||||||
中间件:
|
中间件:
|
||||||
|
|
||||||
- [ ] CORS
|
|
||||||
- [ ] Limiter
|
- [ ] Limiter
|
||||||
- [ ] Compress
|
- [ ] Compress
|
||||||
|
|
||||||
|
检查数据库枚举字段,0 值只作为空值使用
|
||||||
|
|
||||||
实现开发时迁移脚本:
|
实现开发时迁移脚本:
|
||||||
- 检查 sql 注释
|
- 检查 sql 注释
|
||||||
- 执行迁移
|
- 执行迁移
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
|
||||||
"platform/web/services"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
for range 12 {
|
println(rune('\r'))
|
||||||
println(services.ID.GenReadable("res"))
|
println(rune('\n'))
|
||||||
}
|
println(rune('|'))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ create table node (
|
|||||||
version int not null,
|
version int not null,
|
||||||
name varchar(255) not null unique,
|
name varchar(255) not null unique,
|
||||||
host varchar(255) not null,
|
host varchar(255) not null,
|
||||||
isp varchar(255) not null,
|
isp int not null,
|
||||||
prov varchar(255) not null,
|
prov varchar(255) not null,
|
||||||
city varchar(255) not null,
|
city varchar(255) not null,
|
||||||
proxy_id int references proxy (id)
|
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.version is '节点版本';
|
||||||
comment on column node.name is '节点名称';
|
comment on column node.name is '节点名称';
|
||||||
comment on column node.host 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.prov is '省份';
|
||||||
comment on column node.city is '城市';
|
comment on column node.city is '城市';
|
||||||
comment on column node.proxy_id is '代理ID';
|
comment on column node.proxy_id is '代理ID';
|
||||||
@@ -508,7 +508,7 @@ create table channel (
|
|||||||
proxy_host varchar(255) not null default '',
|
proxy_host varchar(255) not null default '',
|
||||||
proxy_port int not null,
|
proxy_port int not null,
|
||||||
node_host varchar(255),
|
node_host varchar(255),
|
||||||
protocol varchar(255),
|
protocol int,
|
||||||
auth_ip bool not null default false,
|
auth_ip bool not null default false,
|
||||||
user_host varchar(255),
|
user_host varchar(255),
|
||||||
auth_pass bool not null default false,
|
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.node_host is '节点地址';
|
||||||
comment on column channel.auth_ip is 'IP认证';
|
comment on column channel.auth_ip is 'IP认证';
|
||||||
comment on column channel.auth_pass is '密码认证';
|
comment on column channel.auth_pass is '密码认证';
|
||||||
comment on column channel.protocol is '协议';
|
comment on column channel.protocol is '协议类型:1-http,2-https,3-socks5';
|
||||||
comment on column channel.username is '用户名';
|
comment on column channel.username is '用户名';
|
||||||
comment on column channel.password is '密码';
|
comment on column channel.password is '密码';
|
||||||
comment on column channel.expiration is '过期时间';
|
comment on column channel.expiration is '过期时间';
|
||||||
|
|||||||
Reference in New Issue
Block a user