From eca58c7032a29a2cfe94c179c23724cd6ae9cb34 Mon Sep 17 00:00:00 2001 From: luorijun Date: Mon, 7 Apr 2025 14:00:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20whitelist.remark=20?= =?UTF-8?q?=E5=88=97=E4=B8=8E=20channel.proxy=5Fhost=20=E5=88=97=E5=B9=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/sql/init.sql | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/sql/init.sql b/scripts/sql/init.sql index 013b1d8..c53e667 100644 --- a/scripts/sql/init.sql +++ b/scripts/sql/init.sql @@ -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);