goku_ce.sql 20.5 KB
Newer Older
E
eoLinker API Management 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591
USE goku_ce;
SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for goku_admin
-- ----------------------------
DROP TABLE IF EXISTS `goku_admin`;
CREATE TABLE `goku_admin` (
  `userID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `loginCall` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `loginPassword` varchar(255) NOT NULL,
  `userType` tinyint(4) NOT NULL DEFAULT '0',
  `groupID` int(11) NOT NULL DEFAULT '0',
  `remark` varchar(255) DEFAULT NULL,
  `permissions` text,
  PRIMARY KEY (`userID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_admin
-- ----------------------------

-- ----------------------------
-- Table structure for goku_balance
-- ----------------------------
DROP TABLE IF EXISTS `goku_balance`;
CREATE TABLE `goku_balance` (
  `balanceID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `balanceName` varchar(255) NOT NULL DEFAULT '',
  `serviceName` varchar(255) NOT NULL DEFAULT '',
  `balanceConfig` text,
  `createTime` timestamp NULL DEFAULT NULL,
  `updateTime` timestamp NULL DEFAULT NULL,
  `balanceDesc` varchar(255) DEFAULT NULL,
  `defaultConfig` text NOT NULL,
  `clusterConfig` text NOT NULL,
  `appName` varchar(255) NOT NULL DEFAULT '',
  `static` text,
  `staticCluster` text,
  PRIMARY KEY (`balanceID`),
  UNIQUE KEY `balanceName` (`balanceName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_balance
-- ----------------------------

-- ----------------------------
-- Table structure for goku_cluster
-- ----------------------------
DROP TABLE IF EXISTS `goku_cluster`;
CREATE TABLE `goku_cluster` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '',
  `title` varchar(50) NOT NULL DEFAULT '',
  `note` varchar(255) DEFAULT NULL,
  `db` text,
  `redis` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `titel` (`title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of goku_cluster
-- ----------------------------

-- ----------------------------
-- Table structure for goku_config_log
-- ----------------------------
DROP TABLE IF EXISTS `goku_config_log`;
CREATE TABLE `goku_config_log` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '',
  `enable` int(11) NOT NULL DEFAULT '0',
  `dir` varchar(255) NOT NULL DEFAULT 'logs/',
  `file` varchar(255) NOT NULL DEFAULT '',
  `period` varchar(10) NOT NULL DEFAULT '',
  `level` varchar(10) NOT NULL DEFAULT '',
  `fields` text NOT NULL,
  `expire` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of goku_config_log
-- ----------------------------

-- ----------------------------
-- Table structure for goku_conn_plugin_api
-- ----------------------------
DROP TABLE IF EXISTS `goku_conn_plugin_api`;
CREATE TABLE `goku_conn_plugin_api` (
  `connID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `apiID` int(11) NOT NULL,
  `pluginName` varchar(255) NOT NULL,
  `pluginConfig` text,
  `strategyID` varchar(255) NOT NULL,
  `pluginInfo` text,
  `createTime` timestamp NULL DEFAULT NULL,
  `updateTime` timestamp NULL DEFAULT NULL,
  `pluginStatus` tinyint(4) DEFAULT NULL,
  `updateTag` varchar(32) DEFAULT NULL COMMENT '更新标识位',
  `updaterID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`connID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_conn_plugin_api
-- ----------------------------

-- ----------------------------
-- Table structure for goku_conn_plugin_strategy
-- ----------------------------
DROP TABLE IF EXISTS `goku_conn_plugin_strategy`;
CREATE TABLE `goku_conn_plugin_strategy` (
  `connID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `strategyID` varchar(255) NOT NULL,
  `pluginName` varchar(255) NOT NULL,
  `pluginConfig` text,
  `pluginInfo` text,
  `createTime` timestamp NULL DEFAULT NULL,
  `updateTime` timestamp NULL DEFAULT NULL,
  `pluginStatus` tinyint(4) DEFAULT NULL,
  `updateTag` varchar(32) DEFAULT NULL COMMENT '更新标识位',
  `updaterID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`connID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_conn_plugin_strategy
-- ----------------------------

-- ----------------------------
-- Table structure for goku_conn_strategy_api
-- ----------------------------
DROP TABLE IF EXISTS `goku_conn_strategy_api`;
CREATE TABLE `goku_conn_strategy_api` (
  `connID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `strategyID` varchar(255) NOT NULL,
  `apiID` int(11) NOT NULL,
  `apiMonitorStatus` int(11) NOT NULL DEFAULT '1',
  `strategyMonitorStatus` int(11) NOT NULL DEFAULT '1',
  `target` varchar(255) DEFAULT NULL,
  `updateTime` datetime DEFAULT NULL,
  PRIMARY KEY (`connID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_conn_strategy_api
-- ----------------------------

-- ----------------------------
-- Table structure for goku_gateway
-- ----------------------------
DROP TABLE IF EXISTS `goku_gateway`;
CREATE TABLE `goku_gateway` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `successCode` varchar(255) NOT NULL,
  `nodeUpdatePeriod` int(11) NOT NULL,
  `monitorUpdatePeriod` int(11) NOT NULL,
  `alertStatus` tinyint(4) NOT NULL DEFAULT '0',
  `sender` varchar(255) DEFAULT NULL,
  `senderPassword` varchar(255) DEFAULT NULL,
  `smtpAddress` varchar(255) DEFAULT NULL,
  `smtpPort` int(11) NOT NULL DEFAULT '25',
  `smtpProtocol` tinyint(4) NOT NULL DEFAULT '0',
  `monitorTimeout` tinyint(4) NOT NULL DEFAULT '5',
  `apiAlertInfo` text,
  `nodeAlertInfo` text,
  `redisAlertInfo` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_gateway
-- ----------------------------
INSERT INTO `goku_gateway` VALUES ('1', '200', '5', '30', '0', null, null, null, '25', '0', '5', '{\"alertAddr\":\"\",\"alertPeriodType\":0,\"logPath\":\"./log/apiAlert\",\"receiverList\":\"\"}', '{\"alertAddr\":\"\",\"logPath\":\"./log/nodeAlert\",\"receiverList\":\"\"}', '{\"alertAddr\":\"\",\"logPath\":\"./log/redisAlert\",\"receiverList\":\"\"}');

-- ----------------------------
-- Table structure for goku_gateway_alert
-- ----------------------------
DROP TABLE IF EXISTS `goku_gateway_alert`;
CREATE TABLE `goku_gateway_alert` (
  `alertID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `requestURL` varchar(255) NOT NULL,
  `targetServer` varchar(255) NOT NULL,
  `alertPeriodType` tinyint(4) NOT NULL,
  `alertCount` int(11) NOT NULL,
  `updateTime` timestamp NULL DEFAULT NULL,
  `targetURL` varchar(255) NOT NULL,
  `clusterName` varchar(255) DEFAULT NULL,
  `nodeIP` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`alertID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_gateway_alert
-- ----------------------------

-- ----------------------------
-- Table structure for goku_gateway_api
-- ----------------------------
DROP TABLE IF EXISTS `goku_gateway_api`;
CREATE TABLE `goku_gateway_api` (
  `apiID` int(11) NOT NULL AUTO_INCREMENT,
  `groupID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `requestURL` varchar(255) NOT NULL,
  `apiName` varchar(255) NOT NULL,
  `requestMethod` varchar(255) NOT NULL,
  `targetServer` varchar(255) DEFAULT NULL,
  `targetURL` varchar(255) DEFAULT NULL,
  `targetMethod` varchar(255) DEFAULT NULL,
  `isFollow` varchar(32) NOT NULL,
  `stripPrefix` varchar(32) DEFAULT NULL,
  `timeout` int(11) DEFAULT NULL,
  `retryCount` int(11) DEFAULT NULL,
  `createTime` timestamp NULL DEFAULT NULL,
  `updateTime` timestamp NULL DEFAULT NULL,
  `alertValve` int(11) NOT NULL DEFAULT '0',
  `monitorStatus` int(11) NOT NULL DEFAULT '0',
  `managerID` int(11) NOT NULL DEFAULT '0',
  `lastUpdateUserID` int(11) NOT NULL DEFAULT '0',
  `createUserID` int(11) NOT NULL,
  `balanceName` varchar(255) DEFAULT NULL,
  `protocol` varchar(20) DEFAULT NULL,
  `stripSlash` varchar(32) NOT NULL DEFAULT '1',
  PRIMARY KEY (`apiID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_gateway_api
-- ----------------------------

-- ----------------------------
-- Table structure for goku_gateway_api_group
-- ----------------------------
DROP TABLE IF EXISTS `goku_gateway_api_group`;
CREATE TABLE `goku_gateway_api_group` (
  `groupID` int(11) NOT NULL AUTO_INCREMENT,
  `projectID` int(11) NOT NULL,
  `groupName` varchar(255) NOT NULL,
  `groupPath` varchar(255) DEFAULT NULL,
  `groupDepth` tinyint(4) NOT NULL DEFAULT '1',
  `parentGroupID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`groupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_gateway_api_group
-- ----------------------------

-- ----------------------------
-- Table structure for goku_gateway_permission_group
-- ----------------------------
DROP TABLE IF EXISTS `goku_gateway_permission_group`;
CREATE TABLE `goku_gateway_permission_group` (
  `groupID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `groupName` varchar(255) NOT NULL,
  `permissions` text,
  PRIMARY KEY (`groupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_gateway_permission_group
-- ----------------------------

-- ----------------------------
-- Table structure for goku_gateway_project
-- ----------------------------
DROP TABLE IF EXISTS `goku_gateway_project`;
CREATE TABLE `goku_gateway_project` (
  `projectID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `projectName` varchar(255) NOT NULL,
  `createTime` timestamp NULL DEFAULT NULL,
  `updateTime` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`projectID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_gateway_project
-- ----------------------------

-- ----------------------------
-- Table structure for goku_gateway_strategy
-- ----------------------------
DROP TABLE IF EXISTS `goku_gateway_strategy`;
CREATE TABLE `goku_gateway_strategy` (
  `strategyID` varchar(32) NOT NULL,
  `strategyName` varchar(255) NOT NULL,
  `updateTime` timestamp NULL DEFAULT NULL,
  `createTime` timestamp NULL DEFAULT NULL,
  `auth` varchar(255) NOT NULL DEFAULT '0',
  `groupID` int(11) NOT NULL DEFAULT '1',
  `monitorStatus` int(4) NOT NULL DEFAULT '0',
  `enableStatus` int(11) NOT NULL DEFAULT '1',
  `strategyType` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`strategyID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_gateway_strategy
-- ----------------------------
INSERT INTO `goku_gateway_strategy` VALUES ('tqvka3', '开放策略', '2019-02-20 09:59:18', '2019-02-20 09:59:21', '0', '1', '0', '1', '1');

-- ----------------------------
-- Table structure for goku_gateway_strategy_group
-- ----------------------------
DROP TABLE IF EXISTS `goku_gateway_strategy_group`;
CREATE TABLE `goku_gateway_strategy_group` (
  `groupID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `groupName` varchar(255) NOT NULL,
  `groupType` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`groupID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_gateway_strategy_group
-- ----------------------------
INSERT INTO `goku_gateway_strategy_group` VALUES ('1', '开放策略', '1');

-- ----------------------------
-- Table structure for goku_message
-- ----------------------------
DROP TABLE IF EXISTS `goku_message`;
CREATE TABLE `goku_message` (
  `msgID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `updateTime` timestamp NULL DEFAULT NULL,
  `msg` varchar(255) DEFAULT NULL,
  `msgType` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`msgID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_message
-- ----------------------------

-- ----------------------------
-- Table structure for goku_monitor_cluster
-- ----------------------------
DROP TABLE IF EXISTS `goku_monitor_cluster`;
CREATE TABLE `goku_monitor_cluster` (
  `recordID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `strategyID` varchar(20) NOT NULL,
  `apiID` int(11) NOT NULL,
  `clusterID` int(11) NOT NULL,
  `hour` int(11) NOT NULL,
  `gatewayRequestCount` int(11) NOT NULL DEFAULT '0',
  `gatewaySuccessCount` int(11) NOT NULL DEFAULT '0',
  `gatewayStatus2xxCount` int(11) NOT NULL DEFAULT '0',
  `gatewayStatus4xxCount` int(11) NOT NULL DEFAULT '0',
  `gatewayStatus5xxCount` int(11) NOT NULL DEFAULT '0',
  `proxyRequestCount` int(11) NOT NULL DEFAULT '0',
  `proxySuccessCount` int(11) NOT NULL DEFAULT '0',
  `proxyStatus2xxCount` int(11) NOT NULL DEFAULT '0',
  `proxyStatus4xxCount` int(11) NOT NULL DEFAULT '0',
  `proxyStatus5xxCount` int(11) NOT NULL DEFAULT '0',
  `proxyTimeoutCount` int(11) NOT NULL DEFAULT '0',
  `updateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`recordID`),
  UNIQUE KEY `key` (`strategyID`,`apiID`,`clusterID`,`hour`),
  KEY `strategyID_2` (`strategyID`),
  KEY `apiID` (`apiID`),
  KEY `clusterID` (`clusterID`),
  KEY `hour` (`hour`),
  KEY `strategy_api` (`strategyID`,`apiID`,`clusterID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_monitor_cluster
-- ----------------------------

-- ----------------------------
-- Table structure for goku_node_group
-- ----------------------------
DROP TABLE IF EXISTS `goku_node_group`;
CREATE TABLE `goku_node_group` (
  `groupID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `groupName` varchar(255) NOT NULL DEFAULT '',
  `groupType` tinyint(4) NOT NULL DEFAULT '0',
  `clusterID` int(11) NOT NULL,
  PRIMARY KEY (`groupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_node_group
-- ----------------------------

-- ----------------------------
-- Table structure for goku_node_info
-- ----------------------------
DROP TABLE IF EXISTS `goku_node_info`;
CREATE TABLE `goku_node_info` (
  `nodeID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nodeIP` varchar(255) NOT NULL,
  `updateStatus` tinyint(4) NOT NULL DEFAULT '0',
  `createTime` timestamp NULL DEFAULT NULL,
  `updateTime` timestamp NULL DEFAULT NULL,
  `groupID` int(11) NOT NULL,
  `nodeName` varchar(255) NOT NULL,
  `nodePort` varchar(255) DEFAULT NULL,
  `nodeStatus` varchar(255) DEFAULT NULL,
  `version` varchar(255) DEFAULT NULL,
  `sshPort` varchar(255) NOT NULL DEFAULT '22',
  `userName` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `gatewayPath` varchar(255) DEFAULT NULL,
  `key` text,
  `authMethod` tinyint(4) NOT NULL DEFAULT '0',
  `clusterID` int(11) NOT NULL,
  PRIMARY KEY (`nodeID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_node_info
-- ----------------------------

-- ----------------------------
-- Table structure for goku_plugin
-- ----------------------------
DROP TABLE IF EXISTS `goku_plugin`;
CREATE TABLE `goku_plugin` (
  `pluginID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pluginName` varchar(255) NOT NULL,
  `chineseName` varchar(255) DEFAULT NULL,
  `pluginStatus` tinyint(4) NOT NULL DEFAULT '0',
  `pluginPriority` int(4) NOT NULL DEFAULT '0',
  `pluginConfig` text,
  `pluginInfo` text,
  `isStop` tinyint(4) NOT NULL DEFAULT '0',
  `pluginType` tinyint(4) NOT NULL DEFAULT '0',
  `official` varchar(255) NOT NULL,
  `pluginDesc` varchar(255) DEFAULT NULL,
  `version` varchar(255) NOT NULL,
  `isCheck` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`pluginID`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for goku_redis_config
-- ----------------------------
DROP TABLE IF EXISTS `goku_redis_config`;
CREATE TABLE `goku_redis_config` (
  `id` int(11) unsigned NOT NULL,
  `cluster_id` int(11) NOT NULL DEFAULT '0',
  `name` varchar(20) NOT NULL DEFAULT '',
  `mod` varchar(10) NOT NULL DEFAULT '',
  `addrs` text NOT NULL,
  `password` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `cluster_id` (`cluster_id`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of goku_redis_config
-- ----------------------------

-- ----------------------------
-- Table structure for goku_redis_info
-- ----------------------------
DROP TABLE IF EXISTS `goku_redis_info`;
CREATE TABLE `goku_redis_info` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `server` varchar(20) NOT NULL COMMENT 'ip:port',
  `info` text NOT NULL COMMENT 'info,json',
  `datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `server` (`server`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of goku_redis_info
-- ----------------------------

-- ----------------------------
-- Table structure for goku_redis_memory
-- ----------------------------
DROP TABLE IF EXISTS `goku_redis_memory`;
CREATE TABLE `goku_redis_memory` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `server` varchar(20) DEFAULT NULL COMMENT 'ip:port',
  `used` int(11) DEFAULT NULL,
  `peak` int(11) DEFAULT NULL,
  `datetime` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `server` (`server`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of goku_redis_memory
-- ----------------------------

-- ----------------------------
-- Table structure for goku_redis_server
-- ----------------------------
DROP TABLE IF EXISTS `goku_redis_server`;
CREATE TABLE `goku_redis_server` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `server` varchar(20) NOT NULL DEFAULT '' COMMENT 'ip:port',
  `password` varchar(20) DEFAULT NULL,
  `clusterID` int(11) NOT NULL DEFAULT '1',
  `status` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `server` (`server`,`clusterID`),
  KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of goku_redis_server
-- ----------------------------

-- ----------------------------
-- Table structure for goku_service_config
-- ----------------------------
DROP TABLE IF EXISTS `goku_service_config`;
CREATE TABLE `goku_service_config` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `default` tinyint(4) DEFAULT NULL,
  `driver` varchar(20) NOT NULL DEFAULT '' COMMENT 'driver.name',
  `desc` text NOT NULL,
  `config` text NOT NULL,
  `clusterConfig` text NOT NULL,
  `healthCheck` tinyint(4) NOT NULL DEFAULT '0',
  `healthCheckPath` varchar(255) NOT NULL DEFAULT '/',
  `healthCheckPeriod` int(11) NOT NULL DEFAULT '5',
  `healthCheckCode` varchar(255) NOT NULL DEFAULT '200',
  `healthCheckTimeOut` int(11) NOT NULL DEFAULT '200',
  `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of goku_service_config
-- ----------------------------

-- ----------------------------
-- Table structure for goku_service_discovery
-- ----------------------------
DROP TABLE IF EXISTS `goku_service_discovery`;
CREATE TABLE `goku_service_discovery` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(30) DEFAULT NULL,
  `type` varchar(20) DEFAULT NULL,
  `remark` varchar(500) DEFAULT NULL,
  `config` text,
  `default` varchar(255) DEFAULT NULL,
  `createTime` timestamp NULL DEFAULT NULL,
  `updateTime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of goku_service_discovery
-- ----------------------------

-- ----------------------------
-- Table structure for goku_table_update_record
-- ----------------------------
DROP TABLE IF EXISTS `goku_table_update_record`;
CREATE TABLE `goku_table_update_record` (
  `name` varchar(64) NOT NULL,
  `updateTime` datetime NOT NULL,
  `tableID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`tableID`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goku_table_update_record
-- ----------------------------

-- ----------------------------
-- Table structure for goku_version
-- ----------------------------
DROP TABLE IF EXISTS `goku_version`;
CREATE TABLE `goku_version` (
  `version` varchar(20) NOT NULL DEFAULT '',
  `sol` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of goku_version
-- ----------------------------
INSERT INTO `goku_version` VALUES ('3.0.0', '0');