goku_ce.sql 13.9 KB
Newer Older
Y
Your Name 已提交
1
PRAGMA foreign_keys = false;
E
eoLinker API Management 已提交
2 3 4 5

-- ----------------------------
-- Table structure for goku_admin
-- ----------------------------
Y
Your Name 已提交
6 7 8 9 10 11 12 13 14 15
DROP TABLE IF EXISTS "goku_admin";
CREATE TABLE "goku_admin" (
  "userID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "loginCall" text(255) NOT NULL,
  "loginPassword" text(255) NOT NULL,
  "userType" integer(4) NOT NULL DEFAULT 0,
  "groupID" integer(11) NOT NULL DEFAULT 0,
  "remark" text(255),
  "permissions" text
);
E
eoLinker API Management 已提交
16 17 18 19

-- ----------------------------
-- Table structure for goku_balance
-- ----------------------------
Y
Your Name 已提交
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
DROP TABLE IF EXISTS "goku_balance";
CREATE TABLE "goku_balance" (
  "balanceID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "balanceName" text(255) NOT NULL,
  "serviceName" text(255) NOT NULL,
  "balanceConfig" text,
  "createTime" text,
  "updateTime" text,
  "balanceDesc" text(255),
  "defaultConfig" text NOT NULL,
  "clusterConfig" text NOT NULL DEFAULT '',
  "appName" text(255) NOT NULL DEFAULT '',
  "static" text,
  "staticCluster" text
);
E
eoLinker API Management 已提交
35 36 37 38

-- ----------------------------
-- Table structure for goku_cluster
-- ----------------------------
Y
Your Name 已提交
39 40 41 42 43 44 45 46 47
DROP TABLE IF EXISTS "goku_cluster";
CREATE TABLE "goku_cluster" (
  "id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "name" text(20) NOT NULL,
  "title" text(50) NOT NULL,
  "note" text(255),
  "db" text,
  "redis" text
);
E
eoLinker API Management 已提交
48 49 50 51

-- ----------------------------
-- Table structure for goku_config_log
-- ----------------------------
Y
Your Name 已提交
52 53 54 55 56 57 58 59 60 61 62 63
DROP TABLE IF EXISTS "goku_config_log";
CREATE TABLE "goku_config_log" (
  "id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "name" text(20) NOT NULL,
  "enable" integer(11) NOT NULL DEFAULT 1,
  "dir" text(255) NOT NULL,
  "file" text(255) NOT NULL,
  "period" text(10) NOT NULL,
  "level" text(10) NOT NULL,
  "fields" text NOT NULL,
  "expire" integer(11) NOT NULL DEFAULT 3
);
E
eoLinker API Management 已提交
64 65 66 67

-- ----------------------------
-- Table structure for goku_conn_plugin_api
-- ----------------------------
Y
Your Name 已提交
68 69 70 71 72 73 74 75 76 77 78 79 80 81
DROP TABLE IF EXISTS "goku_conn_plugin_api";
CREATE TABLE "goku_conn_plugin_api" (
  "connID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "apiID" integer(11) NOT NULL,
  "pluginName" text(255) NOT NULL,
  "pluginConfig" text,
  "strategyID" text(255) NOT NULL,
  "pluginInfo" text,
  "createTime" text,
  "updateTime" text,
  "pluginStatus" integer(4),
  "updateTag" text(32),
  "updaterID" integer(11) NOT NULL DEFAULT 0
);
E
eoLinker API Management 已提交
82 83 84 85

-- ----------------------------
-- Table structure for goku_conn_plugin_strategy
-- ----------------------------
Y
Your Name 已提交
86 87 88 89 90 91 92 93 94 95 96 97 98
DROP TABLE IF EXISTS "goku_conn_plugin_strategy";
CREATE TABLE "goku_conn_plugin_strategy" (
  "connID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "strategyID" text(255) NOT NULL,
  "pluginName" text(255) NOT NULL,
  "pluginConfig" text,
  "pluginInfo" text,
  "createTime" text,
  "updateTime" text,
  "pluginStatus" integer(4),
  "updateTag" text(32),
  "updaterID" integer(11) NOT NULL DEFAULT 0
);
E
eoLinker API Management 已提交
99 100 101 102

-- ----------------------------
-- Table structure for goku_conn_strategy_api
-- ----------------------------
Y
Your Name 已提交
103 104 105 106 107 108 109 110 111 112
DROP TABLE IF EXISTS "goku_conn_strategy_api";
CREATE TABLE "goku_conn_strategy_api" (
  "connID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "strategyID" text(255) NOT NULL,
  "apiID" integer(11) NOT NULL,
  "apiMonitorStatus" integer(11) NOT NULL DEFAULT 0,
  "strategyMonitorStatus" integer(11) NOT NULL DEFAULT 0,
  "target" text(255),
  "updateTime" text
);
E
eoLinker API Management 已提交
113 114 115 116

-- ----------------------------
-- Table structure for goku_gateway
-- ----------------------------
Y
Your Name 已提交
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
DROP TABLE IF EXISTS "goku_gateway";
CREATE TABLE "goku_gateway" (
  "id" integer(11) NOT NULL,
  "successCode" text(255) NOT NULL,
  "nodeUpdatePeriod" integer(11) NOT NULL,
  "monitorUpdatePeriod" integer(11) NOT NULL,
  "alertStatus" integer(4) NOT NULL,
  "alertPeriodType" integer(4) NOT NULL,
  "alertAddress" text(255),
  "alertLogPath" text(255),
  "sender" text(255),
  "senderPassword" text(255),
  "smtpAddress" text(255),
  "smtpPort" integer(11) NOT NULL,
  "smtpProtocol" integer(4) NOT NULL,
  "receiverList" text(255),
  "monitorTimeout" integer(4) NOT NULL,
  "apiAlertInfo" text,
  "nodeAlertInfo" text,
  "redisAlertInfo" text,
  "versionID" INTEGER NOT NULL DEFAULT 0,
  PRIMARY KEY ("id")
);

INSERT INTO "goku_gateway" VALUES (1, 200, 1, 30, 0, 0, NULL, NULL, NULL, NULL, NULL, 25, 0, NULL, 0, NULL, NULL, NULL, 0);
E
eoLinker API Management 已提交
142 143 144 145

-- ----------------------------
-- Table structure for goku_gateway_alert
-- ----------------------------
Y
Your Name 已提交
146 147 148 149 150 151 152 153 154 155 156 157
DROP TABLE IF EXISTS "goku_gateway_alert";
CREATE TABLE "goku_gateway_alert" (
  "alertID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "requestURL" text(255) NOT NULL,
  "targetServer" text(255) NOT NULL,
  "alertPeriodType" integer(4) NOT NULL,
  "alertCount" integer(11) NOT NULL,
  "updateTime" text,
  "targetURL" text(255) NOT NULL,
  "clusterName" text(255),
  "nodeIP" text(255)
);
E
eoLinker API Management 已提交
158 159 160 161

-- ----------------------------
-- Table structure for goku_gateway_api
-- ----------------------------
Y
Your Name 已提交
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
DROP TABLE IF EXISTS "goku_gateway_api";
CREATE TABLE "goku_gateway_api" (
  "apiID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "groupID" integer(11) NOT NULL,
  "projectID" integer(11) NOT NULL,
  "requestURL" text(255) NOT NULL,
  "apiName" text(255) NOT NULL,
  "requestMethod" text(255) NOT NULL,
  "targetServer" text(255),
  "targetURL" text(255),
  "targetMethod" text(255),
  "isFollow" text(32) NOT NULL,
  "stripPrefix" text(32),
  "timeout" integer(11),
  "retryCount" integer(11),
  "createTime" text,
  "updateTime" text,
  "alertValve" integer(11) NOT NULL DEFAULT 0,
  "monitorStatus" integer(11) NOT NULL DEFAULT 1,
  "managerID" integer(11) NOT NULL,
  "lastUpdateUserID" integer(11) NOT NULL,
  "createUserID" integer(11) NOT NULL,
  "balanceName" text(255),
  "protocol" text(20),
  "stripSlash" text(32),
  "apiType" integer NOT NULL DEFAULT 0,
  "responseDataType" text NOT NULL DEFAULT origin,
  "linkApis" TEXT,
  "staticResponse" TEXT
);
E
eoLinker API Management 已提交
192 193 194 195

-- ----------------------------
-- Table structure for goku_gateway_api_group
-- ----------------------------
Y
Your Name 已提交
196 197 198 199 200 201 202 203 204
DROP TABLE IF EXISTS "goku_gateway_api_group";
CREATE TABLE "goku_gateway_api_group" (
  "groupID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "projectID" integer(11) NOT NULL,
  "groupName" text(255) NOT NULL,
  "groupPath" text(255),
  "groupDepth" text(255),
  "parentGroupID" integer(11) NOT NULL DEFAULT 0
);
E
eoLinker API Management 已提交
205 206 207 208

-- ----------------------------
-- Table structure for goku_gateway_permission_group
-- ----------------------------
Y
Your Name 已提交
209 210 211 212 213 214
DROP TABLE IF EXISTS "goku_gateway_permission_group";
CREATE TABLE "goku_gateway_permission_group" (
  "groupID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "groupName" text(255) NOT NULL,
  "permissions" text
);
E
eoLinker API Management 已提交
215 216 217 218

-- ----------------------------
-- Table structure for goku_gateway_project
-- ----------------------------
Y
Your Name 已提交
219 220 221 222 223 224 225
DROP TABLE IF EXISTS "goku_gateway_project";
CREATE TABLE "goku_gateway_project" (
  "projectID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "projectName" text(255) NOT NULL,
  "createTime" text,
  "updateTime" text
);
E
eoLinker API Management 已提交
226 227 228 229

-- ----------------------------
-- Table structure for goku_gateway_strategy
-- ----------------------------
Y
Your Name 已提交
230 231 232 233 234 235 236 237 238 239 240 241 242
DROP TABLE IF EXISTS "goku_gateway_strategy";
CREATE TABLE "goku_gateway_strategy" (
  "strategyID" text(32) NOT NULL,
  "strategyName" text(255) NOT NULL,
  "updateTime" text,
  "createTime" text,
  "auth" text(255),
  "groupID" integer(11) NOT NULL DEFAULT 0,
  "monitorStatus" integer(4) NOT NULL DEFAULT 0,
  "enableStatus" integer(11) NOT NULL DEFAULT 0,
  "strategyType" integer(11) NOT NULL DEFAULT 0,
  PRIMARY KEY ("strategyID")
);
E
eoLinker API Management 已提交
243 244

-- ----------------------------
Y
Your Name 已提交
245
-- Records of "goku_gateway_strategy"
E
eoLinker API Management 已提交
246
-- ----------------------------
Y
Your Name 已提交
247
INSERT INTO "goku_gateway_strategy" VALUES ('RGAtKBd', '开放策略', '2019-10-17 00:00:00', '2019-10-17 00:00:00', NULL, 0, 0, 0, 1);
E
eoLinker API Management 已提交
248 249 250 251

-- ----------------------------
-- Table structure for goku_gateway_strategy_group
-- ----------------------------
Y
Your Name 已提交
252 253 254 255 256 257
DROP TABLE IF EXISTS "goku_gateway_strategy_group";
CREATE TABLE "goku_gateway_strategy_group" (
  "groupID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "groupName" text(255) NOT NULL,
  "groupType" integer(11) NOT NULL DEFAULT 0
);
E
eoLinker API Management 已提交
258 259

-- ----------------------------
Y
Your Name 已提交
260
-- Records of "goku_gateway_strategy_group"
E
eoLinker API Management 已提交
261
-- ----------------------------
Y
Your Name 已提交
262
INSERT INTO "goku_gateway_strategy_group" VALUES (1, '开放分组', 1);
E
eoLinker API Management 已提交
263 264

-- ----------------------------
Y
Your Name 已提交
265
-- Table structure for goku_gateway_version_config
E
eoLinker API Management 已提交
266
-- ----------------------------
Y
Your Name 已提交
267 268 269 270 271 272 273 274 275 276 277 278 279
DROP TABLE IF EXISTS "goku_gateway_version_config";
CREATE TABLE "goku_gateway_version_config" (
  "versionID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "name" TEXT NOT NULL,
  "version" TEXT,
  "remark" TEXT,
  "createTime" TEXT,
  "updateTime" TEXT,
  "publishTime" TEXT,
  "config" TEXT,
  "balanceConfig" TEXT,
  "discoverConfig" TEXT
);
E
eoLinker API Management 已提交
280 281 282 283

-- ----------------------------
-- Table structure for goku_monitor_cluster
-- ----------------------------
Y
Your Name 已提交
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
DROP TABLE IF EXISTS "goku_monitor_cluster";
CREATE TABLE "goku_monitor_cluster" (
  "recordID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "strategyID" text(20) NOT NULL,
  "apiID" integer(11) NOT NULL,
  "clusterID" integer(11) NOT NULL,
  "hour" integer(11) NOT NULL,
  "gatewayRequestCount" integer(11) NOT NULL,
  "gatewaySuccessCount" integer(11) NOT NULL,
  "gatewayStatus2xxCount" integer(11) NOT NULL,
  "gatewayStatus4xxCount" integer(11) NOT NULL,
  "gatewayStatus5xxCount" integer(11) NOT NULL,
  "proxyRequestCount" integer(11) NOT NULL,
  "proxySuccessCount" integer(11) NOT NULL,
  "proxyStatus2xxCount" integer(11) NOT NULL,
  "proxyStatus4xxCount" integer(11) NOT NULL,
  "proxyStatus5xxCount" integer(11) NOT NULL,
  "proxyTimeoutCount" integer(11) NOT NULL,
  "updateTime" text NOT NULL
);
E
eoLinker API Management 已提交
304 305 306 307

-- ----------------------------
-- Table structure for goku_node_group
-- ----------------------------
Y
Your Name 已提交
308 309 310 311 312 313 314
DROP TABLE IF EXISTS "goku_node_group";
CREATE TABLE "goku_node_group" (
  "groupID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "groupName" text(255) NOT NULL,
  "groupType" integer(4) NOT NULL,
  "clusterID" integer(11) NOT NULL
);
E
eoLinker API Management 已提交
315 316 317 318

-- ----------------------------
-- Table structure for goku_node_info
-- ----------------------------
Y
Your Name 已提交
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
DROP TABLE IF EXISTS "goku_node_info";
CREATE TABLE "goku_node_info" (
  "nodeID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "nodeIP" text(255) NOT NULL,
  "updateStatus" integer(4) NOT NULL DEFAULT 0,
  "createTime" text,
  "updateTime" text,
  "groupID" integer(11) NOT NULL DEFAULT 0,
  "nodeName" text(255) NOT NULL,
  "nodePort" text(255),
  "nodeStatus" integer(11) NOT NULL,
  "version" text(255),
  "sshPort" text(255) DEFAULT 22,
  "userName" text(255),
  "password" text(255),
  "gatewayPath" text(255),
  "key" text,
  "authMethod" integer(4) NOT NULL DEFAULT 0,
  "clusterID" integer(11) NOT NULL DEFAULT 0
);
E
eoLinker API Management 已提交
339 340 341 342

-- ----------------------------
-- Table structure for goku_plugin
-- ----------------------------
Y
Your Name 已提交
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358
DROP TABLE IF EXISTS "goku_plugin";
CREATE TABLE "goku_plugin" (
  "pluginID" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "pluginName" text(255) NOT NULL,
  "chineseName" text(255),
  "pluginStatus" integer(4) NOT NULL,
  "pluginPriority" integer(4) NOT NULL,
  "pluginConfig" text,
  "pluginInfo" text,
  "isStop" integer(4) NOT NULL,
  "pluginType" integer(4) NOT NULL,
  "official" text(255) NOT NULL,
  "pluginDesc" text(255),
  "version" text(255) NOT NULL,
  "isCheck" integer(4) NOT NULL
);
E
eoLinker API Management 已提交
359 360 361


-- ----------------------------
Y
Your Name 已提交
362
-- Table structure for goku_service_config
E
eoLinker API Management 已提交
363
-- ----------------------------
Y
Your Name 已提交
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380
DROP TABLE IF EXISTS "goku_service_config";
CREATE TABLE "goku_service_config" (
  "id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "name" text(255) NOT NULL,
  "default" integer(4),
  "driver" text(20) NOT NULL,
  "desc" text NOT NULL,
  "config" text NOT NULL,
  "clusterConfig" text NOT NULL,
  "healthCheck" integer(4) NOT NULL,
  "healthCheckPath" text(255) NOT NULL,
  "healthCheckPeriod" integer(11) NOT NULL,
  "healthCheckCode" text(255) NOT NULL,
  "healthCheckTimeOut" integer(11) NOT NULL,
  "createTime" text NOT NULL,
  "updateTime" text NOT NULL
);
E
eoLinker API Management 已提交
381 382

-- ----------------------------
Y
Your Name 已提交
383
-- Table structure for goku_service_discovery
E
eoLinker API Management 已提交
384
-- ----------------------------
Y
Your Name 已提交
385 386 387 388 389 390 391 392 393 394 395
DROP TABLE IF EXISTS "goku_service_discovery";
CREATE TABLE "goku_service_discovery" (
  "id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
  "name" text(30),
  "type" text(20),
  "remark" text(500),
  "config" text,
  "default" text(255),
  "createTime" text,
  "updateTime" text
);
E
eoLinker API Management 已提交
396 397

-- ----------------------------
Y
Your Name 已提交
398
-- Table structure for goku_table_update_record
E
eoLinker API Management 已提交
399
-- ----------------------------
Y
Your Name 已提交
400 401 402 403 404 405
DROP TABLE IF EXISTS "goku_table_update_record";
CREATE TABLE "goku_table_update_record" (
  "name" text(64) NOT NULL,
  "updateTime" text NOT NULL,
  "tableID" integer NOT NULL PRIMARY KEY AUTOINCREMENT
);
E
eoLinker API Management 已提交
406 407 408


-- ----------------------------
Y
Your Name 已提交
409
-- Records of "sqlite_sequence"
E
eoLinker API Management 已提交
410
-- ----------------------------
Y
Your Name 已提交
411 412 413 414 415
INSERT INTO "sqlite_sequence" VALUES ('goku_admin', 1);
INSERT INTO "sqlite_sequence" VALUES ('goku_plugin', 30);
INSERT INTO "sqlite_sequence" VALUES ('goku_balance', 0);
INSERT INTO "sqlite_sequence" VALUES ('goku_config_log', 0);
INSERT INTO "sqlite_sequence" VALUES ('goku_gateway_strategy_group', 1);
E
eoLinker API Management 已提交
416 417

-- ----------------------------
Y
Your Name 已提交
418
-- Auto increment value for goku_admin
E
eoLinker API Management 已提交
419
-- ----------------------------
Y
Your Name 已提交
420
UPDATE "sqlite_sequence" SET seq = 1 WHERE name = 'goku_admin';
E
eoLinker API Management 已提交
421 422

-- ----------------------------
Y
Your Name 已提交
423
-- Auto increment value for goku_balance
E
eoLinker API Management 已提交
424 425 426
-- ----------------------------

-- ----------------------------
Y
Your Name 已提交
427
-- Indexes structure for table goku_balance
E
eoLinker API Management 已提交
428
-- ----------------------------
Y
Your Name 已提交
429 430 431 432
CREATE INDEX "balanceName"
ON "goku_balance" (
  "balanceName" ASC
);
E
eoLinker API Management 已提交
433 434

-- ----------------------------
Y
Your Name 已提交
435
-- Indexes structure for table goku_cluster
E
eoLinker API Management 已提交
436
-- ----------------------------
Y
Your Name 已提交
437 438 439 440
CREATE INDEX "name"
ON "goku_cluster" (
  "name" ASC
);
E
eoLinker API Management 已提交
441 442

-- ----------------------------
Y
Your Name 已提交
443
-- Auto increment value for goku_config_log
E
eoLinker API Management 已提交
444 445 446
-- ----------------------------

-- ----------------------------
Y
Your Name 已提交
447
-- Auto increment value for goku_gateway_strategy_group
E
eoLinker API Management 已提交
448
-- ----------------------------
Y
Your Name 已提交
449
UPDATE "sqlite_sequence" SET seq = 1 WHERE name = 'goku_gateway_strategy_group';
E
eoLinker API Management 已提交
450 451

-- ----------------------------
Y
Your Name 已提交
452
-- Auto increment value for goku_plugin
E
eoLinker API Management 已提交
453
-- ----------------------------
Y
Your Name 已提交
454
UPDATE "sqlite_sequence" SET seq = 30 WHERE name = 'goku_plugin';
E
eoLinker API Management 已提交
455

Y
Your Name 已提交
456
PRAGMA foreign_keys = true;