From d36dc77491103dec1b51174be63189f433324e3c Mon Sep 17 00:00:00 2001 From: sumory Date: Thu, 9 Feb 2017 13:40:53 +0800 Subject: [PATCH] release v0.6.1 --- CHANGELOG.md | 6 +- README.md | 2 +- README_zh.md | 2 +- install/orange-v0.6.0.sql | 21 --- install/orange-v0.6.1.sql | 301 ++++++++++++++++++++++++++++++++++++++ orange/version.lua | 2 +- 6 files changed, 309 insertions(+), 25 deletions(-) create mode 100644 install/orange-v0.6.1.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index 1288d4d9..df697777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -### v0.6.0 beta 2016.11.13 +### v0.6.1 2017.02.09 + +添加property based rate limiting插件,该插件由[@noname007](https://github.com/noname007)贡献 + +### v0.6.0 2016.11.13 注意,0.6.*版本与之前的版本并不兼容,主要改动如下: diff --git a/README.md b/README.md index 596b4e34..f051d099 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ A Gateway based on OpenResty(Nginx+lua) for API Monitoring and Management. - install OpenResty with `--with-http_stub_status_module` option - [Lor Framework](https://github.com/sumory/lor) v0.2.5+ -Import the SQL file(e.g. install/orange-v0.6.0.sql) which is adapted to your Orange version to MySQL database named `orange`. +Import the SQL file(e.g. install/orange-v0.6.1.sql) which is adapted to your Orange version to MySQL database named `orange`. #### Install diff --git a/README_zh.md b/README_zh.md index c6ec7dde..5dce83ba 100644 --- a/README_zh.md +++ b/README_zh.md @@ -28,7 +28,7 @@ Orange是一个基于OpenResty的API网关。除Nginx的基本功能外,它还 #### 数据表导入MySQL - 在MySQL中创建数据库,名为orange -- 将与当前代码版本配套的SQL脚本(如install/orange-v0.6.0.sql)导入到orange库中 +- 将与当前代码版本配套的SQL脚本(如install/orange-v0.6.1.sql)导入到orange库中 #### 修改配置文件 diff --git a/install/orange-v0.6.0.sql b/install/orange-v0.6.0.sql index 642be558..637b9690 100644 --- a/install/orange-v0.6.0.sql +++ b/install/orange-v0.6.0.sql @@ -192,27 +192,6 @@ VALUES /*!40000 ALTER TABLE `rate_limiting` ENABLE KEYS */; UNLOCK TABLES; -DROP TABLE IF EXISTS `property_rate_limiting`; - -CREATE TABLE `property_rate_limiting` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `key` varchar(255) NOT NULL DEFAULT '', - `value` varchar(2000) NOT NULL DEFAULT '', - `type` varchar(11) DEFAULT '0', - `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_key` (`key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -LOCK TABLES `property_rate_limiting` WRITE; -/*!40000 ALTER TABLE `property_rate_limiting` DISABLE KEYS */; - -INSERT INTO `property_rate_limiting` (`id`, `key`, `value`, `type`, `op_time`) -VALUES - (1,'1','{}','meta','2016-11-11 11:11:11'); - -/*!40000 ALTER TABLE `property_rate_limiting` ENABLE KEYS */; -UNLOCK TABLES; # Dump of table redirect # ------------------------------------------------------------ diff --git a/install/orange-v0.6.1.sql b/install/orange-v0.6.1.sql new file mode 100644 index 00000000..90b3cf19 --- /dev/null +++ b/install/orange-v0.6.1.sql @@ -0,0 +1,301 @@ +# ************************************************************ +# Sequel Pro SQL dump +# Version 4096 +# +# http://www.sequelpro.com/ +# http://code.google.com/p/sequel-pro/ +# +# Host: 127.0.0.1 (MySQL 5.6.15) +# Database: orange_test +# Generation Time: 2016-11-13 14:48:35 +0000 +# ************************************************************ + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + + +# Dump of table basic_auth +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `basic_auth`; + +CREATE TABLE `basic_auth` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL DEFAULT '', + `value` varchar(2000) NOT NULL DEFAULT '', + `type` varchar(11) DEFAULT '0', + `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_key` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +LOCK TABLES `basic_auth` WRITE; +/*!40000 ALTER TABLE `basic_auth` DISABLE KEYS */; + +INSERT INTO `basic_auth` (`id`, `key`, `value`, `type`, `op_time`) +VALUES + (1,'1','{}','meta','2016-11-11 11:11:11'); + +/*!40000 ALTER TABLE `basic_auth` ENABLE KEYS */; +UNLOCK TABLES; + + +# Dump of table dashboard_user +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `dashboard_user`; + +CREATE TABLE `dashboard_user` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `username` varchar(60) NOT NULL DEFAULT '' COMMENT '用户名', + `password` varchar(255) NOT NULL DEFAULT '' COMMENT '密码', + `is_admin` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否是管理员账户:0否,1是', + `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建或者更新时间', + `enable` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否启用该用户:0否1是', + PRIMARY KEY (`id`), + UNIQUE KEY `unique_username` (`username`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='dashboard users'; + +LOCK TABLES `dashboard_user` WRITE; +/*!40000 ALTER TABLE `dashboard_user` DISABLE KEYS */; + +INSERT INTO `dashboard_user` (`id`, `username`, `password`, `is_admin`, `create_time`, `enable`) +VALUES + (1,'admin','1fe832a7246fd19b7ea400a10d23d1894edfa3a5e09ee27e0c4a96eb0136763d',1,'2016-11-11 11:11:11',1); + +/*!40000 ALTER TABLE `dashboard_user` ENABLE KEYS */; +UNLOCK TABLES; + + +# Dump of table divide +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `divide`; + +CREATE TABLE `divide` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL DEFAULT '', + `value` varchar(2000) NOT NULL DEFAULT '', + `type` varchar(11) DEFAULT '0', + `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_key` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +LOCK TABLES `divide` WRITE; +/*!40000 ALTER TABLE `divide` DISABLE KEYS */; + +INSERT INTO `divide` (`id`, `key`, `value`, `type`, `op_time`) +VALUES + (1,'1','{}','meta','2016-11-11 11:11:11'); + +/*!40000 ALTER TABLE `divide` ENABLE KEYS */; +UNLOCK TABLES; + + +# Dump of table key_auth +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `key_auth`; + +CREATE TABLE `key_auth` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL DEFAULT '', + `value` varchar(2000) NOT NULL DEFAULT '', + `type` varchar(11) DEFAULT '0', + `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_key` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +LOCK TABLES `key_auth` WRITE; +/*!40000 ALTER TABLE `key_auth` DISABLE KEYS */; + +INSERT INTO `key_auth` (`id`, `key`, `value`, `type`, `op_time`) +VALUES + (1,'1','{}','meta','2016-11-11 11:11:11'); + +/*!40000 ALTER TABLE `key_auth` ENABLE KEYS */; +UNLOCK TABLES; + + +# Dump of table meta +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `meta`; + +CREATE TABLE `meta` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL DEFAULT '', + `value` varchar(5000) NOT NULL DEFAULT '', + `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_key` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + + +# Dump of table monitor +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `monitor`; + +CREATE TABLE `monitor` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL DEFAULT '', + `value` varchar(2000) NOT NULL DEFAULT '', + `type` varchar(11) DEFAULT '0', + `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_key` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +LOCK TABLES `monitor` WRITE; +/*!40000 ALTER TABLE `monitor` DISABLE KEYS */; + +INSERT INTO `monitor` (`id`, `key`, `value`, `type`, `op_time`) +VALUES + (1,'1','{}','meta','2016-11-11 11:11:11'); + +/*!40000 ALTER TABLE `monitor` ENABLE KEYS */; +UNLOCK TABLES; + + +# Dump of table rate_limiting +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `rate_limiting`; + +CREATE TABLE `rate_limiting` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL DEFAULT '', + `value` varchar(2000) NOT NULL DEFAULT '', + `type` varchar(11) DEFAULT '0', + `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_key` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +LOCK TABLES `rate_limiting` WRITE; +/*!40000 ALTER TABLE `rate_limiting` DISABLE KEYS */; + +INSERT INTO `rate_limiting` (`id`, `key`, `value`, `type`, `op_time`) +VALUES + (1,'1','{}','meta','2016-11-11 11:11:11'); + +/*!40000 ALTER TABLE `rate_limiting` ENABLE KEYS */; +UNLOCK TABLES; + +DROP TABLE IF EXISTS `property_rate_limiting`; + +CREATE TABLE `property_rate_limiting` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL DEFAULT '', + `value` varchar(2000) NOT NULL DEFAULT '', + `type` varchar(11) DEFAULT '0', + `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_key` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +LOCK TABLES `property_rate_limiting` WRITE; +/*!40000 ALTER TABLE `property_rate_limiting` DISABLE KEYS */; + +INSERT INTO `property_rate_limiting` (`id`, `key`, `value`, `type`, `op_time`) +VALUES + (1,'1','{}','meta','2016-11-11 11:11:11'); + +/*!40000 ALTER TABLE `property_rate_limiting` ENABLE KEYS */; +UNLOCK TABLES; + +# Dump of table redirect +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `redirect`; + +CREATE TABLE `redirect` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL DEFAULT '', + `value` varchar(2000) NOT NULL DEFAULT '', + `type` varchar(11) DEFAULT '0', + `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_key` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +LOCK TABLES `redirect` WRITE; +/*!40000 ALTER TABLE `redirect` DISABLE KEYS */; + +INSERT INTO `redirect` (`id`, `key`, `value`, `type`, `op_time`) +VALUES + (1,'1','{}','meta','2016-11-11 11:11:11'); + +/*!40000 ALTER TABLE `redirect` ENABLE KEYS */; +UNLOCK TABLES; + + +# Dump of table rewrite +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `rewrite`; + +CREATE TABLE `rewrite` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL DEFAULT '', + `value` varchar(2000) NOT NULL DEFAULT '', + `type` varchar(11) DEFAULT '0', + `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_key` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +LOCK TABLES `rewrite` WRITE; +/*!40000 ALTER TABLE `rewrite` DISABLE KEYS */; + +INSERT INTO `rewrite` (`id`, `key`, `value`, `type`, `op_time`) +VALUES + (1,'1','{}','meta','2016-11-11 11:11:11'); + +/*!40000 ALTER TABLE `rewrite` ENABLE KEYS */; +UNLOCK TABLES; + + +# Dump of table waf +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `waf`; + +CREATE TABLE `waf` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL DEFAULT '', + `value` varchar(2000) NOT NULL DEFAULT '', + `type` varchar(11) DEFAULT '0', + `op_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_key` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +LOCK TABLES `waf` WRITE; +/*!40000 ALTER TABLE `waf` DISABLE KEYS */; + +INSERT INTO `waf` (`id`, `key`, `value`, `type`, `op_time`) +VALUES + (1,'1','{}','meta','2016-11-11 11:11:11'); + +/*!40000 ALTER TABLE `waf` ENABLE KEYS */; +UNLOCK TABLES; + + + +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/orange/version.lua b/orange/version.lua index 89d1b06e..a8e1b9ba 100644 --- a/orange/version.lua +++ b/orange/version.lua @@ -1,2 +1,2 @@ -local version = "0.6.0" +local version = "0.6.1" return version