msp/models/mysql.ddl.sql

114 lines
1.7 KiB
MySQL
Raw Permalink Normal View History

2024-11-01 11:35:45 +08:00
2024-11-01 15:52:46 +08:00
-- ./hostdev.xlsx
2024-11-01 11:35:45 +08:00
2024-11-01 15:52:46 +08:00
drop table if exists hostdev;
CREATE TABLE hostdev
2024-11-01 11:35:45 +08:00
(
`id` VARCHAR(32) comment 'id',
2024-11-01 15:52:46 +08:00
`name` VARCHAR(400) comment '主机名称',
2024-11-01 11:35:45 +08:00
`description` VARCHAR(500) comment '描述',
`ownerid` VARCHAR(32) comment '属主id',
2024-11-01 15:52:46 +08:00
`hostname` VARCHAR(400) comment '域名',
`local_ip` VARCHAR(100) comment '内网地址',
`external_ip` VARCHAR(100) comment '外网地址',
2024-11-01 11:35:45 +08:00
`port` int comment '端口',
`user` VARCHAR(400) comment '用户',
`passwd` VARCHAR(400) comment '用户密码',
2024-11-01 15:52:46 +08:00
`jumperid` VARCHAR(32) comment '跳板id'
2024-11-01 11:35:45 +08:00
,primary key(id)
)
engine=innodb
default charset=utf8
2024-11-01 15:52:46 +08:00
comment '主机设备'
2024-11-01 11:35:45 +08:00
;
2024-11-01 15:52:46 +08:00
-- ./jumper.xlsx
2024-11-01 11:35:45 +08:00
2024-11-01 15:52:46 +08:00
drop table if exists jumper;
CREATE TABLE jumper
2024-11-01 11:35:45 +08:00
(
`id` VARCHAR(32) comment 'id',
2024-11-01 15:52:46 +08:00
`name` VARCHAR(400) comment '跳板名称',
`ownerid` VARCHAR(32) comment '属主id'
2024-11-01 11:35:45 +08:00
,primary key(id)
)
engine=innodb
default charset=utf8
2024-11-01 15:52:46 +08:00
comment '跳板'
2024-11-01 11:35:45 +08:00
;
2024-11-01 15:52:46 +08:00
-- ./xterm.xlsx
2024-11-01 11:35:45 +08:00
2024-11-01 15:52:46 +08:00
drop table if exists xterm;
CREATE TABLE xterm
2024-11-01 11:35:45 +08:00
(
`id` VARCHAR(32) comment 'id',
2024-11-01 15:52:46 +08:00
`name` VARCHAR(400) comment '终端名称',
2024-11-01 11:35:45 +08:00
`description` VARCHAR(500) comment '描述',
`ownerid` VARCHAR(32) comment '属主id',
2024-11-01 15:52:46 +08:00
`hostid` VARCHAR(400) comment '主机id',
`cmd` VARCHAR(4000) comment '命令'
2024-11-01 11:35:45 +08:00
,primary key(id)
)
engine=innodb
default charset=utf8
2024-11-01 15:52:46 +08:00
comment '终端'
2024-11-01 11:35:45 +08:00
;
2024-11-01 15:52:46 +08:00
-- ./jumperhost.xlsx
2024-11-01 11:35:45 +08:00
2024-11-01 15:52:46 +08:00
drop table if exists jumperhost;
CREATE TABLE jumperhost
2024-11-01 11:35:45 +08:00
(
`id` VARCHAR(32) comment 'id',
2024-11-01 15:52:46 +08:00
`stepno` int comment '跳步顺序',
`jumperid` VARCHAR(400) comment '跳板id',
`hostid` VARCHAR(500) comment '主机id'
2024-11-01 11:35:45 +08:00
,primary key(id)
)
engine=innodb
default charset=utf8
2024-11-01 15:52:46 +08:00
comment '跳板主机'
2024-11-01 11:35:45 +08:00
;