n9e_hbs.sql 919 字节
Newer Older
7
3.0.0  
710leo 已提交
1 2 3 4 5 6 7 8 9 10
set names utf8;

drop database if exists n9e_hbs;
create database n9e_hbs;
use n9e_hbs;

create table `instance` (
  `id`        int unsigned not null auto_increment,
  `module`    varchar(32) not null,  
  `identity`  varchar(255) not null,
U
Ulric Qin 已提交
11 12 13
  `rpc_port`  varchar(16) not null default 0,
  `http_port` varchar(16) not null default 0,
  `region`    varchar(32) not null default 'default',
Y
yubo 已提交
14
  `remark`    text,
7
3.0.0  
710leo 已提交
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
  `ts`        int unsigned not null,
  primary key (`id`),
  key(`module`,`identity`,`rpc_port`,`http_port`)
) engine=innodb default charset=utf8;

create table `detector` (
  `id`      int unsigned not null auto_increment,
  `module`  varchar(32) not null,  
  `node`    varchar(16) not null,
  `region`  varchar(64) not null,
  `ip`      varchar(255) not null,
  `port`    varchar(16) not null,
  `ts`      int unsigned not null,
  primary key (`id`),
  key(`ip`,`port`)
Y
yubo 已提交
30
) engine=innodb default charset=utf8;