create table sj_server_node ( id bigint unsigned auto_increment comment '主键' primary key, namespace_id varchar(64) default '764d604ec6fc45f68cd92514c40e9e1a' not null comment '命名空间id', group_name varchar(64) not null comment '组名称', host_id varchar(64) not null comment '主机id', host_ip varchar(64) not null comment '机器ip', host_port int not null comment '机器端口', expire_at datetime not null comment '过期时间', node_type tinyint not null comment '节点类型 1、客户端 2、是服务端', ext_attrs varchar(256) default '' null comment '扩展字段', create_dt datetime default CURRENT_TIMESTAMP not null comment '创建时间', update_dt datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间', constraint uk_host_id_host_ip unique (host_id, host_ip) ) comment '服务器节点'; create index idx_expire_at_node_type on sj_server_node (expire_at, node_type); create index idx_namespace_id_group_name on sj_server_node (namespace_id, group_name);