parent
ef51fe7667
commit
02c53920a4
@ -1,13 +0,0 @@ |
||||
DROP TABLE IF EXISTS `config_common`; |
||||
|
||||
CREATE TABLE `config_common` ( |
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
||||
`config_group` varchar(64) NOT NULL DEFAULT '' COMMENT '配置分组', |
||||
`config_key` varchar(64) NOT NULL DEFAULT '' COMMENT '配置key', |
||||
`content` varchar(128) NOT NULL DEFAULT '' COMMENT '内容', |
||||
`remark` varchar(128) DEFAULT NULL COMMENT '备注', |
||||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
||||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
||||
PRIMARY KEY (`id`), |
||||
UNIQUE KEY `uk_groupkey` (`config_group`,`config_key`) USING BTREE |
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='通用配置表'; |
@ -1,20 +0,0 @@ |
||||
DROP TABLE IF EXISTS `isv_keys`; |
||||
|
||||
CREATE TABLE `isv_keys` ( |
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
||||
`app_key` varchar(128) NOT NULL DEFAULT '应用id(交给开发者)', |
||||
`sign_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1:RSA2,2:MD5', |
||||
`secret` varchar(200) NOT NULL DEFAULT '' COMMENT 'sign_type=2时使用', |
||||
`key_format` tinyint(4) NOT NULL DEFAULT '1' COMMENT '秘钥格式,1:PKCS8(JAVA适用),2:PKCS1(非JAVA适用)', |
||||
`public_key_isv` text NOT NULL COMMENT '开发者生成的公钥', |
||||
`private_key_isv` text NOT NULL COMMENT '开发者生成的私钥(交给开发者)', |
||||
`public_key_platform` text NOT NULL COMMENT '平台生成的公钥(交给开发者)', |
||||
`private_key_platform` text NOT NULL COMMENT '平台生成的私钥', |
||||
`gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, |
||||
`gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
||||
PRIMARY KEY (`id`), |
||||
UNIQUE KEY `uk_appkey` (`app_key`) USING BTREE |
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ISV秘钥'; |
||||
|
||||
INSERT INTO `sop`.`isv_keys` (`app_key`,`sign_type`, `secret`,`key_format`, `public_key_isv`, `private_key_isv`, `public_key_platform`, `private_key_platform`) |
||||
select app_key, sign_type, secret, 1, pub_key,pri_key,'','' from isv_info; |
@ -1,2 +0,0 @@ |
||||
ALTER TABLE `sop`.`isv_info` ADD COLUMN `remark` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注' AFTER `sign_type`; |
||||
|
@ -1,11 +0,0 @@ |
||||
use sop; |
||||
|
||||
CREATE TABLE `config_ip_blacklist` ( |
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
||||
`ip` varchar(64) NOT NULL DEFAULT '' COMMENT 'ip', |
||||
`remark` varchar(128) DEFAULT NULL COMMENT '备注', |
||||
`gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, |
||||
`gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
||||
PRIMARY KEY (`id`), |
||||
UNIQUE KEY `uk_ip` (`ip`) USING BTREE |
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='IP黑名单'; |
@ -1,25 +0,0 @@ |
||||
use sop; |
||||
|
||||
CREATE TABLE `config_gray` ( |
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
||||
`service_id` varchar(64) NOT NULL DEFAULT '', |
||||
`user_key_content` text COMMENT '用户key,多个用引文逗号隔开', |
||||
`name_version_content` text COMMENT '需要灰度的接口,goods.get1.0=1.2,多个用英文逗号隔开', |
||||
`gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, |
||||
`gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
||||
PRIMARY KEY (`id`), |
||||
UNIQUE KEY `uk_serviceid` (`service_id`) USING BTREE |
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='服务灰度配置'; |
||||
|
||||
|
||||
CREATE TABLE `config_gray_instance` ( |
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
||||
`instance_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'instance_id', |
||||
`service_id` varchar(64) NOT NULL DEFAULT '' COMMENT 'service_id', |
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:禁用,1:启用', |
||||
`gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, |
||||
`gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
||||
PRIMARY KEY (`id`), |
||||
UNIQUE KEY `uk_instanceid` (`instance_id`) USING BTREE, |
||||
KEY `idx_serviceid` (`service_id`) USING BTREE |
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='开启灰度服务器实例'; |
@ -1,3 +0,0 @@ |
||||
ALTER TABLE `sop`.`isv_info` ADD COLUMN `sign_type` TINYINT NOT NULL DEFAULT 1 COMMENT '签名类型,1:RSA2,2:MD5' AFTER `status`; |
||||
|
||||
update isv_info set sign_type=2 where secret <> ''; |
@ -1,16 +0,0 @@ |
||||
DROP TABLE IF EXISTS `user_info`; |
||||
|
||||
CREATE TABLE `user_info` ( |
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
||||
`username` varchar(64) NOT NULL DEFAULT '' COMMENT '用户名', |
||||
`password` varchar(128) NOT NULL DEFAULT '' COMMENT '密码', |
||||
`nickname` varchar(64) NOT NULL DEFAULT '' COMMENT '昵称', |
||||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
||||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
||||
PRIMARY KEY (`id`), |
||||
KEY `idx_unamepwd` (`username`,`password`) USING BTREE |
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户信息表'; |
||||
|
||||
|
||||
INSERT INTO `user_info` ( `username`, `password`, `nickname`, `gmt_create`, `gmt_modified`) VALUES |
||||
('zhangsan','123456','张三','2019-04-27 08:32:57','2019-04-27 08:32:57'); |
@ -1,32 +0,0 @@ |
||||
|
||||
DROP TABLE IF EXISTS `config_limit`; |
||||
|
||||
|
||||
CREATE TABLE `config_limit` ( |
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
||||
`route_id` varchar(128) DEFAULT NULL COMMENT '路由id', |
||||
`app_key` varchar(128) DEFAULT NULL, |
||||
`limit_ip` varchar(300) DEFAULT NULL COMMENT '限流ip,多个用英文逗号隔开', |
||||
`service_id` varchar(64) NOT NULL DEFAULT '' COMMENT '服务id', |
||||
`limit_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:漏桶策略,2:令牌桶策略', |
||||
`exec_count_per_second` int(11) DEFAULT NULL COMMENT '每秒可处理请求数', |
||||
`limit_code` varchar(64) DEFAULT NULL COMMENT '返回的错误码', |
||||
`limit_msg` varchar(100) DEFAULT NULL COMMENT '返回的错误信息', |
||||
`token_bucket_count` int(11) DEFAULT NULL COMMENT '令牌桶容量', |
||||
`limit_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '限流开启状态,1:开启,0关闭', |
||||
`order_index` int(11) NOT NULL DEFAULT '0' COMMENT '顺序,值小的优先执行', |
||||
`remark` varchar(128) DEFAULT NULL COMMENT '备注', |
||||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
||||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
||||
PRIMARY KEY (`id`) |
||||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='限流配置'; |
||||
|
||||
INSERT INTO `config_limit` (`id`, `route_id`, `app_key`, `limit_ip`, `service_id`, `limit_type`, `exec_count_per_second`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `order_index`, `remark`, `gmt_create`, `gmt_modified`) VALUES |
||||
(1,'alipay.story.get1.0','','192.168.1.1,172.2.2.3','story-service',2,5,'','',6,1,3,NULL,'2019-05-17 19:21:35','2019-05-21 09:12:15'), |
||||
(2,'alipay.story.get1.0','2019032617262200001','','story-service',1,5,'service-budy','服务器忙',5,1,0,NULL,'2019-05-17 19:39:30','2019-05-21 15:36:52'), |
||||
(3,'alipay.story.find1.0','20190331562013861008375808','','story-service',1,3,'service-busy','服务器忙',5,1,1,NULL,'2019-05-17 20:20:32','2019-05-20 17:40:17'), |
||||
(4,'alipay.story.get1.2','','','story-service',2,5,'','',3,1,1,NULL,'2019-05-20 16:27:21','2019-05-21 15:53:10'), |
||||
(5,'','20190401562373796095328256','','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个appKey调用很频繁,重点照顾','2019-05-21 15:48:08','2019-05-21 18:45:32'), |
||||
(6,'','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个ip在攻击我们','2019-05-21 15:55:33','2019-05-21 18:17:29'), |
||||
(7,'story.get1.1','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 16:30:48','2019-05-21 16:30:48'), |
||||
(8,'','20190513577548661718777857','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 17:10:45','2019-05-21 17:10:52'); |
Loading…
Reference in new issue