添加 whitelist.remark 列与 channel.proxy_host 列并调整索引

This commit is contained in:
2025-04-07 14:00:47 +08:00
parent 67d82c4308
commit eca58c7032

View File

@@ -473,6 +473,7 @@ create table whitelist (
on update cascade
on delete cascade,
host varchar(45) not null,
remark varchar(255),
created_at timestamp default current_timestamp,
updated_at timestamp default current_timestamp,
deleted_at timestamp
@@ -486,6 +487,7 @@ comment on table whitelist is '白名单表';
comment on column whitelist.id is '白名单ID';
comment on column whitelist.user_id is '用户ID';
comment on column whitelist.host is 'IP地址';
comment on column whitelist.remark is '备注';
comment on column whitelist.created_at is '创建时间';
comment on column whitelist.updated_at is '更新时间';
comment on column whitelist.deleted_at is '删除时间';
@@ -503,11 +505,12 @@ create table channel (
node_id int references node (id) --
on update cascade --
on delete set null,
proxy_host varchar(255) not null default '',
proxy_port int not null,
protocol varchar(255),
user_host varchar(255),
node_host varchar(255),
protocol varchar(255),
auth_ip bool not null default false,
user_host varchar(255),
auth_pass bool not null default false,
username varchar(255) unique,
password varchar(255),
@@ -519,9 +522,13 @@ create table channel (
create index channel_user_id_index on channel (user_id);
create index channel_proxy_id_index on channel (proxy_id);
create index channel_node_id_index on channel (node_id);
create index channel_user_host_index on channel (user_host);
create index channel_proxy_host_index on channel (proxy_host);
create index channel_proxy_port_index on channel (proxy_port);
create index channel_node_host_index on channel (node_host);
create index channel_auth_ip_index on channel (auth_ip);
create index channel_user_host_index on channel (user_host);
create index channel_auth_pass_index on channel (auth_pass);
create index channel_username_index on channel (username);
create index channel_expiration_index on channel (expiration);
create index channel_deleted_at_index on channel (deleted_at);