Просмотр исходного кода

1.MERGED
2.移除2018年sql更新文件

admin 6 лет назад
Родитель
Сommit
e1a4ab66f6
54 измененных файлов с 28 добавлено и 539 удалено
  1. 26 0
      app/helpers.php
  2. 2 2
      resources/views/user/services.blade.php
  3. 0 1
      sql/update/20180106.sql
  4. 0 2
      sql/update/20180119.sql
  5. 0 43
      sql/update/20180205.sql
  6. 0 2
      sql/update/20180216.sql
  7. 0 2
      sql/update/20180227.sql
  8. 0 5
      sql/update/20180301.sql
  9. 0 2
      sql/update/20180305.sql
  10. 0 24
      sql/update/20180313.sql
  11. 0 2
      sql/update/20180321.sql
  12. 0 19
      sql/update/20180325.sql
  13. 0 2
      sql/update/20180331.sql
  14. 0 8
      sql/update/20180403.sql
  15. 0 7
      sql/update/20180413.sql
  16. 0 10
      sql/update/20180423.sql
  17. 0 9
      sql/update/20180424.sql
  18. 0 2
      sql/update/20180427.sql
  19. 0 10
      sql/update/20180428.sql
  20. 0 2
      sql/update/20180510.sql
  21. 0 2
      sql/update/20180520.sql
  22. 0 12
      sql/update/20180529.sql
  23. 0 2
      sql/update/20180609.sql
  24. 0 18
      sql/update/20180626.sql
  25. 0 3
      sql/update/20180705.sql
  26. 0 5
      sql/update/20180709.sql
  27. 0 8
      sql/update/20180724.sql
  28. 0 2
      sql/update/20180727.sql
  29. 0 2
      sql/update/20180801.sql
  30. 0 6
      sql/update/20180814.sql
  31. 0 80
      sql/update/20180820.sql
  32. 0 14
      sql/update/20180821.sql
  33. 0 19
      sql/update/20180823.sql
  34. 0 4
      sql/update/20180829.sql
  35. 0 27
      sql/update/20180903.sql
  36. 0 32
      sql/update/20180910.sql
  37. 0 2
      sql/update/20180911.sql
  38. 0 3
      sql/update/20180917.sql
  39. 0 2
      sql/update/20180919.sql
  40. 0 3
      sql/update/20180928.sql
  41. 0 2
      sql/update/20180929.sql
  42. 0 27
      sql/update/20181001.sql
  43. 0 7
      sql/update/20181021.sql
  44. 0 35
      sql/update/20181022.sql
  45. 0 10
      sql/update/20181027.sql
  46. 0 3
      sql/update/20181031.sql
  47. 0 21
      sql/update/20181106.sql
  48. 0 3
      sql/update/20181115.sql
  49. 0 4
      sql/update/20181121.sql
  50. 0 2
      sql/update/20181130.sql
  51. 0 5
      sql/update/20181204.sql
  52. 0 2
      sql/update/20181206.sql
  53. 0 9
      sql/update/20181221.sql
  54. 0 9
      sql/update/20181222.sql

+ 26 - 0
app/helpers.php

@@ -237,3 +237,29 @@ if (!function_exists('createGuid')) {
         return strtolower($uuid);
     }
 }
+
+// 过滤emoji表情
+if (!function_exists('filterEmoji')) {
+    function filterEmoji($str)
+    {
+        $str = preg_replace_callback('/./u',
+            function (array $match) {
+                return strlen($match[0]) >= 4 ? '' : $match[0];
+            },
+            $str);
+
+        return $str;
+    }
+}
+
+// 验证手机号是否正确
+if (!function_exists('isMobile')) {
+    function isMobile($mobile)
+    {
+        if (!is_numeric($mobile)) {
+            return false;
+        }
+
+        return preg_match('#^13[\d]{9}$|^14[5,7]{1}\d{8}$|^15[^4]{1}\d{8}$|^17[0,6,7,8]{1}\d{8}$|^18[\d]{9}$#', $mobile) ? true : false;
+    }
+}

+ 2 - 2
resources/views/user/services.blade.php

@@ -59,8 +59,8 @@
                                     @if($direction)
                                         {!!$direction->content!!}
                                     @else
-                                        <div style="text-align: center;">
-                                            <h3>暂无说明</h3>
+                                        <div style="text-align: center; padding-top: 10px;">
+                                            <h2>暂无说明</h2>
                                         </div>
                                     @endif
                                 </div>

+ 0 - 1
sql/update/20180106.sql

@@ -1 +0,0 @@
-INSERT INTO `config` VALUES ('46', 'is_free_code', 0);

+ 0 - 2
sql/update/20180119.sql

@@ -1,2 +0,0 @@
--- 禁止通过代理访问网站
-INSERT INTO `config` VALUES ('47', 'is_forbid_robot', 0);

+ 0 - 43
sql/update/20180205.sql

@@ -1,43 +0,0 @@
--- 节点订阅地址
-INSERT INTO `config` VALUES ('48', 'subscribe_domain', '');
-
--- 节点订阅地址缩短并改为可以识别大小写
-ALTER TABLE `user_subscribe`
-MODIFY COLUMN `code`  char(20) BINARY CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '订阅地址唯一识别码' AFTER `user_id`;
-
--- 标签
-CREATE TABLE `label` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
-  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序值',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='标签';
-
-INSERT INTO `label` VALUES ('1', '电信', '0');
-INSERT INTO `label` VALUES ('2', '联通', '0');
-INSERT INTO `label` VALUES ('3', '移动', '0');
-INSERT INTO `label` VALUES ('4', '教育网', '0');
-INSERT INTO `label` VALUES ('5', '其他网络', '0');
-INSERT INTO `label` VALUES ('6', '免费体验', '0');
-
--- 用户标签
-CREATE TABLE `user_label` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
-  `label_id` int(11) NOT NULL DEFAULT '0' COMMENT '标签ID',
-  PRIMARY KEY (`id`),
-  KEY `idx` (`user_id`,`label_id`),
-  KEY `idx_user_id` (`user_id`),
-  KEY `idx_label_id` (`label_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户标签';
-
--- 节点标签
-CREATE TABLE `ss_node_label` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
-  `label_id` int(11) NOT NULL DEFAULT '0' COMMENT '标签ID',
-  PRIMARY KEY (`id`),
-  KEY `idx` (`node_id`,`label_id`),
-  KEY `idx_node_id` (`node_id`),
-  KEY `idx_label_id` (`label_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点标签';

+ 0 - 2
sql/update/20180216.sql

@@ -1,2 +0,0 @@
--- 节点分离域名地址和IP地址
-alter table ss_node add column `ip` varchar(30) DEFAULT NULL COMMENT '服务器IP地址' after `server`;

+ 0 - 2
sql/update/20180227.sql

@@ -1,2 +0,0 @@
--- 自动释放端口
-INSERT INTO `config` VALUES ('49', 'auto_release_port', 1);

+ 0 - 5
sql/update/20180301.sql

@@ -1,5 +0,0 @@
--- 修改字段默认值
-ALTER TABLE `ss_node`
-	CHANGE COLUMN `is_subscribe` `is_subscribe` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '是否允许用户订阅该节点:0-否、1-是' AFTER `monitor_url`,
-	CHANGE COLUMN `compatible` `compatible` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '兼容SS' AFTER `is_tcp_check`,
-	CHANGE COLUMN `single` `single` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '单端口多用户:0-否、1-是' AFTER `compatible`;

+ 0 - 2
sql/update/20180305.sql

@@ -1,2 +0,0 @@
--- 去掉user表的唯一索引,解决无法自动释放端口的问题
-ALTER TABLE `user` DROP INDEX `port`;

+ 0 - 24
sql/update/20180313.sql

@@ -1,24 +0,0 @@
--- 加入有赞云支付
-INSERT INTO `config` VALUES ('50', 'is_youzan', 0);
-INSERT INTO `config` VALUES ('51', 'youzan_client_id', '');
-INSERT INTO `config` VALUES ('52', 'youzan_client_secret', '');
-INSERT INTO `config` VALUES ('53', 'kdt_id', '');
-
--- 更新payment表
-DROP TABLE `payment`;
-CREATE TABLE `payment` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `sn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
-  `user_id` int(11) NOT NULL COMMENT '用户ID',
-  `oid` int(11) DEFAULT NULL COMMENT '本地订单ID',
-  `orderId` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '本地订单长ID',
-  `pay_way` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1' COMMENT '支付类型:1-扫码支付',
-  `amount` int(11) NOT NULL DEFAULT '0' COMMENT '金额,单位分',
-  `qr_id` int(11) NOT NULL DEFAULT '0' COMMENT '有赞生成的支付单ID',
-  `qr_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '有赞生成的支付二维码URL',
-  `qr_code` text COLLATE utf8mb4_unicode_ci COMMENT '有赞生成的支付二维码图片base64',
-  `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态:-1-支付失败、0-等待支付、1-支付成功',
-  `created_at` datetime NOT NULL,
-  `updated_at` datetime NOT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

+ 0 - 2
sql/update/20180321.sql

@@ -1,2 +0,0 @@
--- 注册默认的标签
-INSERT INTO `config` VALUES ('54', 'initial_labels_for_user', '');

+ 0 - 19
sql/update/20180325.sql

@@ -1,19 +0,0 @@
--- 有赞云回调日志
-CREATE TABLE `payment_callback` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `client_id` varchar(50) DEFAULT NULL,
-  `yz_id` varchar(50) DEFAULT NULL,
-  `kdt_id` varchar(50) DEFAULT NULL,
-  `kdt_name` varchar(50) DEFAULT NULL,
-  `mode` tinyint(4) DEFAULT NULL,
-  `msg` text,
-  `sendCount` int(11) DEFAULT NULL,
-  `sign` varchar(32) DEFAULT NULL,
-  `status` varchar(30) DEFAULT NULL,
-  `test` tinyint(4) DEFAULT NULL,
-  `type` varchar(50) DEFAULT NULL,
-  `version` varchar(50) DEFAULT NULL,
-  `created_at` datetime DEFAULT NULL,
-  `updated_at` datetime DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='有赞云回调日志';

+ 0 - 2
sql/update/20180331.sql

@@ -1,2 +0,0 @@
--- 修正节点不填写域名错误
-alter table ss_node modify column server varchar(255) null default '';

+ 0 - 8
sql/update/20180403.sql

@@ -1,8 +0,0 @@
--- 节点表 增加 ipv6 字段
-ALTER TABLE `ss_node`
-	ADD COLUMN `ipv6` VARCHAR(128) NULL DEFAULT '' COMMENT '服务器IPV6地址' AFTER `ip`;
-
--- 节点表 修改字段长度
-ALTER TABLE `ss_node`
-	CHANGE COLUMN `server` `server` VARCHAR(128) NULL DEFAULT NULL COMMENT '服务器域名地址' AFTER `country_code`,
-	CHANGE COLUMN `ip` `ip` CHAR(15) NULL DEFAULT NULL COMMENT '服务器IPV4地址' AFTER `server`;

+ 0 - 7
sql/update/20180413.sql

@@ -1,7 +0,0 @@
--- config表字段类型变更,为了加入统计代码和客服代码
-ALTER TABLE `config`
-CHANGE COLUMN `value` `value` TEXT NULL COMMENT '配置值' AFTER `name`;
-
--- 加入网站统计代码、在线客服代码
-INSERT INTO `config` VALUES ('55', 'website_analytics', '');
-INSERT INTO `config` VALUES ('56', 'website_customer_service', '');

+ 0 - 10
sql/update/20180423.sql

@@ -1,10 +0,0 @@
--- 订单表字段改名
-ALTER TABLE `order`
-	CHANGE COLUMN `totalOriginalPrice` `origin_amount` INT(11) NOT NULL DEFAULT '0' COMMENT '订单原始总价,单位分' AFTER `coupon_id`,
-	CHANGE COLUMN `totalPrice` `amount` INT(11) NOT NULL DEFAULT '0' COMMENT '订单总价,单位分' AFTER `origin_amount`;
-
-
-
--- 订单商品表字段改名
-ALTER TABLE `order_goods`
-	CHANGE COLUMN `original_price` `origin_price` INT(11) NOT NULL DEFAULT '0' COMMENT '商品原价,单位分' AFTER `num`;

+ 0 - 9
sql/update/20180424.sql

@@ -1,9 +0,0 @@
--- 订单编号改名
-ALTER TABLE `order`
-	CHANGE COLUMN `orderId` `order_sn` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '订单编号' COLLATE 'utf8mb4_unicode_ci' AFTER `oid`;
-
-ALTER TABLE `payment`
-	CHANGE COLUMN `orderId` `order_sn` VARCHAR(50) NULL DEFAULT NULL COMMENT '本地订单长ID' COLLATE 'utf8mb4_unicode_ci' AFTER `oid`;
-
-ALTER TABLE `order_goods`
-	CHANGE COLUMN `orderId` `order_sn` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '订单编号' AFTER `oid`;

+ 0 - 2
sql/update/20180427.sql

@@ -1,2 +0,0 @@
--- 加入IP注册限制
-INSERT INTO `config` VALUES ('57', 'register_ip_limit', 5);

+ 0 - 10
sql/update/20180428.sql

@@ -1,10 +0,0 @@
--- 商品标签
-CREATE TABLE `goods_label` (
-	`id` INT(11) NOT NULL AUTO_INCREMENT,
-	`goods_id` INT(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
-	`label_id` INT(11) NOT NULL DEFAULT '0' COMMENT '标签ID',
-	PRIMARY KEY (`id`),
-	INDEX `idx` (`goods_id`, `label_id`),
-	INDEX `idx_goods_id` (`goods_id`),
-	INDEX `idx_label_id` (`label_id`)
-) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE='utf8mb4_unicode_ci' COMMENT='商品标签';

+ 0 - 2
sql/update/20180510.sql

@@ -1,2 +0,0 @@
--- payment表加入qr_local_url字段
-ALTER TABLE `payment` ADD COLUMN `qr_local_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '支付二维码的本地存储URL' AFTER `qr_code`;

+ 0 - 2
sql/update/20180520.sql

@@ -1,2 +0,0 @@
--- 节点是否允许用户订阅
-ALTER TABLE `ss_node` ADD COLUMN `is_subscribe` TINYINT(4) NULL DEFAULT '1' COMMENT '是否允许用户订阅该节点:0-否、1-是' AFTER `monitor_url`;

+ 0 - 12
sql/update/20180529.sql

@@ -1,12 +0,0 @@
--- 用户小时流量记录表加索引,用于加速查询统计
-ALTER TABLE `user_traffic_hourly`
-ADD INDEX `idx_node` (`node_id`) USING BTREE ,
-ADD INDEX `idx_total` (`total`) USING BTREE ,
-ADD INDEX `idx_node_total` (`node_id`, `total`) USING BTREE ;
-
-
--- 用户小时流量记录表加索引,用于加速查询统计
-ALTER TABLE `user_traffic_daily`
-ADD INDEX `idx_node` (`node_id`) USING BTREE ,
-ADD INDEX `idx_total` (`total`) USING BTREE ,
-ADD INDEX `idx_node_total` (`node_id`, `total`) USING BTREE ;

+ 0 - 2
sql/update/20180609.sql

@@ -1,2 +0,0 @@
--- 加入限购配置
-INSERT INTO `config` VALUES ('58', 'goods_purchase_limit_strategy', 'none');

+ 0 - 18
sql/update/20180626.sql

@@ -1,18 +0,0 @@
-INSERT INTO `config` VALUES ('59', 'is_push_bear', 0);
-INSERT INTO `config` VALUES ('60', 'push_bear_send_key', '');
-INSERT INTO `config` VALUES ('61', 'push_bear_qrcode', '');
-INSERT INTO `config` VALUES ('62', 'is_ban_status', 0);
-
-
-CREATE TABLE `marketing` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `type` TINYINT(4) NOT NULL COMMENT '类型:1-邮件群发、2-订阅渠道群发',
-  `receiver` TEXT NOT NULL COMMENT '接收者' COLLATE 'utf8mb4_unicode_ci',
-  `title` VARCHAR(255) NOT NULL COMMENT '标题' COLLATE 'utf8mb4_unicode_ci',
-  `content` TEXT NOT NULL COMMENT '内容' COLLATE 'utf8mb4_unicode_ci',
-  `error` VARCHAR(255) NULL COMMENT '错误信息' COLLATE 'utf8mb4_unicode_ci',
-  `status` TINYINT(4) NOT NULL COMMENT '状态:-1-失败、0-待发送、1-成功',
-  `created_at` DATETIME NOT NULL,
-  `updated_at` DATETIME NOT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE='utf8mb4_unicode_ci';

+ 0 - 3
sql/update/20180705.sql

@@ -1,3 +0,0 @@
--- 用途可以多选
-ALTER TABLE `user`
-	CHANGE COLUMN `usage` `usage` VARCHAR(10) NOT NULL DEFAULT '4' COMMENT '用途:1-手机、2-电脑、3-路由器、4-其他' AFTER `qq`;

+ 0 - 5
sql/update/20180709.sql

@@ -1,5 +0,0 @@
--- 加入namesilo节点自动更新域名DNS配置
-INSERT INTO `config` VALUES ('63', 'is_namesilo', 0);
-INSERT INTO `config` VALUES ('64', 'namesilo_key', '');
-INSERT INTO `config` VALUES ('65', 'website_logo', '');
-INSERT INTO `config` VALUES ('66', 'website_home_logo', '');

+ 0 - 8
sql/update/20180724.sql

@@ -1,8 +0,0 @@
--- 节点表增加防墙监测字段
-ALTER TABLE `ss_node` ADD COLUMN `ssh_port` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '22' COMMENT 'SSH端口' AFTER `is_subscribe`;
-ALTER TABLE `ss_node` ADD COLUMN `icmp` TINYINT(4) NOT NULL DEFAULT '1' COMMENT 'ICMP检测:-2-内外都不通、-1-内不通外通、0-外不通内通、1-内外都通'  AFTER `ssh_port`;
-ALTER TABLE `ss_node` ADD COLUMN `tcp` TINYINT(4) NOT NULL DEFAULT '1' COMMENT 'TCP检测:-2-内外都不通、-1-内不通外通、0-外不通内通、1-内外都通' AFTER `icmp`;
-ALTER TABLE `ss_node` ADD COLUMN `udp` TINYINT(4) NOT NULL DEFAULT '1' COMMENT 'ICMP检测:-2-内外都不通、-1-内不通外通、0-外不通内通、1-内外都通' AFTER `tcp`;
-
--- 优惠券操作日志加备注字段
-ALTER TABLE `coupon_log` ADD COLUMN `desc` varchar(50) NOT NULL DEFAULT '' COMMENT '备注' AFTER `order_id`;

+ 0 - 2
sql/update/20180727.sql

@@ -1,2 +0,0 @@
--- 加入TCP阻断探测开关
-INSERT INTO `config` VALUES ('67', 'is_tcp_check', 0);

+ 0 - 2
sql/update/20180801.sql

@@ -1,2 +0,0 @@
--- 商品加排序
-ALTER TABLE `goods` ADD COLUMN `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序' AFTER `days`;

+ 0 - 6
sql/update/20180814.sql

@@ -1,6 +0,0 @@
-CREATE TABLE `sensitive_words` (
-	`id` INT(11) NOT NULL AUTO_INCREMENT,
-	`words` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '敏感词',
-	`created_at` DATETIME NOT NULL COMMENT '创建时间',
-	PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='敏感词';

+ 0 - 80
sql/update/20180820.sql

@@ -1,80 +0,0 @@
--- 移除created_at字段
-ALTER TABLE sensitive_words DROP COLUMN created_at;
-
--- 敏感词:加入常见临时邮箱,用于屏蔽羊毛党
-INSERT INTO `sensitive_words` (`words`) VALUES ('chacuo.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('chacuo.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('1766258.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('3202.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('4057.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('4059.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('a7996.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('bccto.me');
-INSERT INTO `sensitive_words` (`words`) VALUES ('bnuis.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('chaichuang.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('cr219.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('cuirushi.org');
-INSERT INTO `sensitive_words` (`words`) VALUES ('dawin.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('jiaxin8736.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('lakqs.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('urltc.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('027168.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('10minutemail.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('11163.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('1shivom.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('auoie.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('bareed.ws');
-INSERT INTO `sensitive_words` (`words`) VALUES ('bit-degree.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('cjpeg.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('cool.fr.nf');
-INSERT INTO `sensitive_words` (`words`) VALUES ('courriel.fr.nf');
-INSERT INTO `sensitive_words` (`words`) VALUES ('disbox.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('disbox.org');
-INSERT INTO `sensitive_words` (`words`) VALUES ('fidelium10.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('get365.pw');
-INSERT INTO `sensitive_words` (`words`) VALUES ('ggr.la');
-INSERT INTO `sensitive_words` (`words`) VALUES ('grr.la');
-INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamail.biz');
-INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamail.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamail.de');
-INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamail.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamail.org');
-INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamailblock.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('hubii-network.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('hurify1.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('itoup.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('jetable.fr.nf');
-INSERT INTO `sensitive_words` (`words`) VALUES ('jnpayy.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('juyouxi.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('mail.bccto.me');
-INSERT INTO `sensitive_words` (`words`) VALUES ('www.bccto.me');
-INSERT INTO `sensitive_words` (`words`) VALUES ('mega.zik.dj');
-INSERT INTO `sensitive_words` (`words`) VALUES ('moakt.co');
-INSERT INTO `sensitive_words` (`words`) VALUES ('moakt.ws');
-INSERT INTO `sensitive_words` (`words`) VALUES ('molms.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('moncourrier.fr.nf');
-INSERT INTO `sensitive_words` (`words`) VALUES ('monemail.fr.nf');
-INSERT INTO `sensitive_words` (`words`) VALUES ('monmail.fr.nf');
-INSERT INTO `sensitive_words` (`words`) VALUES ('nomail.xl.cx');
-INSERT INTO `sensitive_words` (`words`) VALUES ('nospam.ze.tc');
-INSERT INTO `sensitive_words` (`words`) VALUES ('pay-mon.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('poly-swarm.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('sgmh.online');
-INSERT INTO `sensitive_words` (`words`) VALUES ('sharklasers.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('shiftrpg.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('spam4.me');
-INSERT INTO `sensitive_words` (`words`) VALUES ('speed.1s.fr');
-INSERT INTO `sensitive_words` (`words`) VALUES ('tmail.ws');
-INSERT INTO `sensitive_words` (`words`) VALUES ('tmails.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('tmpmail.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('tmpmail.org');
-INSERT INTO `sensitive_words` (`words`) VALUES ('travala10.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('yopmail.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('yopmail.fr');
-INSERT INTO `sensitive_words` (`words`) VALUES ('yopmail.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('yuoia.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('zep-hyr.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('zippiex.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('lrc8.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('1otc.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('emailna.co');

+ 0 - 14
sql/update/20180821.sql

@@ -1,14 +0,0 @@
--- ss_node 加索引
-ALTER TABLE `ss_node`
-	ADD INDEX `idx_group` (`group_id`),
-	ADD INDEX `idx_sub` (`is_subscribe`);
-
-
--- user 加索引
-ALTER TABLE `user`
-	ADD INDEX `idx_search` (`enable`, `status`);
-
-
--- order 加索引
-ALTER TABLE `order`
-	ADD INDEX `idx_order_search` (`user_id`, `goods_id`, `is_expire`, `status`);

+ 0 - 19
sql/update/20180823.sql

@@ -1,19 +0,0 @@
--- 加入登录日志表
-CREATE TABLE `user_login_log` (
-	`id` INT(11) NOT NULL AUTO_INCREMENT,
-	`user_id` INT(11) NOT NULL DEFAULT '0',
-	`ip` CHAR(20) NOT NULL,
-	`country` CHAR(20) NOT NULL,
-	`country_id` CHAR(20) NOT NULL,
-	`region` CHAR(20) NOT NULL,
-	`region_id` CHAR(20) NOT NULL,
-	`city` CHAR(20) NOT NULL,
-	`city_id` CHAR(20) NOT NULL,
-	`county` CHAR(20) NOT NULL,
-	`county_id` CHAR(20) NOT NULL,
-	`isp` CHAR(20) NOT NULL,
-	`isp_id` CHAR(20) NOT NULL,
-	`created_at` DATETIME NOT NULL,
-	`updated_at` DATETIME NOT NULL,
-	PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户登录日志';

+ 0 - 4
sql/update/20180829.sql

@@ -1,4 +0,0 @@
--- 加入敏感词
-INSERT INTO `sensitive_words` (`words`) VALUES ('mailinator.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('nbzmr.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('awsoo.com');

+ 0 - 27
sql/update/20180903.sql

@@ -1,27 +0,0 @@
--- 更改用户登录IP日志表结构
-ALTER TABLE `user_login_log`
-	ALTER `region` DROP DEFAULT,
-	ALTER `isp_id` DROP DEFAULT;
-
-ALTER TABLE `user_login_log`
-	CHANGE COLUMN `region` `province` CHAR(20) NOT NULL AFTER `country`,
-	CHANGE COLUMN `isp_id` `area` CHAR(20) NOT NULL AFTER `isp`,
-	DROP COLUMN `country_id`,
-	DROP COLUMN `region_id`,
-	DROP COLUMN `city_id`,
-	DROP COLUMN `county_id`;
-
-ALTER TABLE `user_login_log`
-	ALTER `country` DROP DEFAULT,
-	ALTER `province` DROP DEFAULT,
-	ALTER `city` DROP DEFAULT,
-	ALTER `county` DROP DEFAULT,
-	ALTER `isp` DROP DEFAULT,
-	ALTER `area` DROP DEFAULT;
-ALTER TABLE `user_login_log`
-	CHANGE COLUMN `country` `country` VARCHAR(80) NOT NULL AFTER `ip`,
-	CHANGE COLUMN `province` `province` VARCHAR(80) NOT NULL AFTER `country`,
-	CHANGE COLUMN `city` `city` VARCHAR(80) NOT NULL AFTER `province`,
-	CHANGE COLUMN `county` `county` VARCHAR(80) NOT NULL AFTER `city`,
-	CHANGE COLUMN `isp` `isp` VARCHAR(50) NOT NULL AFTER `county`,
-	CHANGE COLUMN `area` `area` VARCHAR(200) NOT NULL AFTER `isp`;

+ 0 - 32
sql/update/20180910.sql

@@ -1,32 +0,0 @@
--- 加入敏感词
-INSERT INTO `sensitive_words` (`words`) VALUES ('zhcne.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('0box.eu');
-INSERT INTO `sensitive_words` (`words`) VALUES ('contbay.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('damnthespam.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('kurzepost.de');
-INSERT INTO `sensitive_words` (`words`) VALUES ('objectmail.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('proxymail.eu');
-INSERT INTO `sensitive_words` (`words`) VALUES ('rcpt.at');
-INSERT INTO `sensitive_words` (`words`) VALUES ('trash-mail.at');
-INSERT INTO `sensitive_words` (`words`) VALUES ('trashmail.at');
-INSERT INTO `sensitive_words` (`words`) VALUES ('trashmail.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('trashmail.io');
-INSERT INTO `sensitive_words` (`words`) VALUES ('trashmail.me');
-INSERT INTO `sensitive_words` (`words`) VALUES ('trashmail.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('wegwerfmail.de');
-INSERT INTO `sensitive_words` (`words`) VALUES ('wegwerfmail.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('wegwerfmail.org');
-INSERT INTO `sensitive_words` (`words`) VALUES ('nwytg.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('despam.it');
-INSERT INTO `sensitive_words` (`words`) VALUES ('spambox.us');
-INSERT INTO `sensitive_words` (`words`) VALUES ('spam.la');
-INSERT INTO `sensitive_words` (`words`) VALUES ('mytrashmail.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('mt2014.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('mt2015.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('thankyou2010.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('trash2009.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('mt2009.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('trashymail.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('tempemail.net');
-INSERT INTO `sensitive_words` (`words`) VALUES ('slopsbox.com');
-INSERT INTO `sensitive_words` (`words`) VALUES ('mailnesia.com');

+ 0 - 2
sql/update/20180911.sql

@@ -1,2 +0,0 @@
--- 加入TCP阻断检测提醒次数
-INSERT INTO `config` VALUES ('68', 'tcp_check_warning_times', 3);

+ 0 - 3
sql/update/20180917.sql

@@ -1,3 +0,0 @@
--- 屏蔽大陆访问、屏蔽海外访问
-INSERT INTO `config` VALUES ('69', 'is_forbid_china', 0);
-INSERT INTO `config` VALUES ('70', 'is_forbid_oversea', 0);

+ 0 - 2
sql/update/20180919.sql

@@ -1,2 +0,0 @@
--- 将invite表 uid=1 的改为 0(系统生成)
-UPDATE `invite` SET `uid` = 0 WHERE `uid` = 1;

+ 0 - 3
sql/update/20180928.sql

@@ -1,3 +0,0 @@
--- 节点是否启用检测
-ALTER TABLE `ss_node`
-ADD COLUMN `is_tcp_check` tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否开启检测: 0-不开启、1-开启' AFTER `ssh_port`;

+ 0 - 2
sql/update/20180929.sql

@@ -1,2 +0,0 @@
--- 必须邀请注册 重新定义为 新值 2
-UPDATE `config` SET `value` = 2 WHERE name = 'is_invite_register';

+ 0 - 27
sql/update/20181001.sql

@@ -1,27 +0,0 @@
--- ----------------------------
--- Table structure for `user_traffic_modify_log`
--- ----------------------------
-DROP TABLE IF EXISTS `user_traffic_modify_log`;
-CREATE TABLE `user_traffic_modify_log` (
-	`id` INT(11) NOT NULL AUTO_INCREMENT,
-	`user_id` INT(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
-	`order_id` INT(11) NOT NULL DEFAULT '0' COMMENT '发生的订单ID',
-	`before` INT(11) NOT NULL DEFAULT '0',
-	`after` INT(11) NOT NULL DEFAULT '0',
-	`desc` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '描述',
-	`created_at` DATETIME NOT NULL,
-	`updated_at` DATETIME NOT NULL,
-	PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户流量变动日志';
-
--- 商品表加入商品颜色字段
-ALTER TABLE `goods`
-	ADD COLUMN `color` VARCHAR(50) NOT NULL DEFAULT 'green' COMMENT '商品颜色' AFTER `days`;
-
--- 商品表加入是否热销字段
-ALTER TABLE `goods`
-	ADD COLUMN `is_hot` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否热销:0-否、1-是' AFTER `sort`;
-
--- 订单表加入邮箱字段
-ALTER TABLE `order`
-ADD COLUMN `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '邮箱' AFTER `coupon_id`;

+ 0 - 7
sql/update/20181021.sql

@@ -1,7 +0,0 @@
--- 加入激活类型
-ALTER TABLE `verify`
-	ADD COLUMN `type` TINYINT NOT NULL DEFAULT '1' COMMENT '激活类型:1-自行激活、2-管理员激活' AFTER `id`;
-
--- 移除无用username字段
-ALTER TABLE `verify`
-	DROP COLUMN `username`;

+ 0 - 35
sql/update/20181022.sql

@@ -1,35 +0,0 @@
--- 加入服务类型
-ALTER TABLE `ss_node`
-	ADD COLUMN `type` TINYINT NOT NULL DEFAULT '1' COMMENT '服务类型:1-SS、2-V2ray' AFTER `id`;
-
--- 加入V2ray额外ID
-ALTER TABLE `ss_node`
-	ADD COLUMN `v2_alter_id` INT(11) NOT NULL DEFAULT '16' COMMENT 'V2ray额外ID' AFTER `status`;
-
--- 加入V2ray端口
-ALTER TABLE `ss_node`
-	ADD COLUMN `v2_port` INT(11) NOT NULL DEFAULT '0' COMMENT 'V2ray端口' AFTER `v2_alter_id`;
-
--- 加入V2ray传输协议
-ALTER TABLE `ss_node`
-	ADD COLUMN `v2_net` VARCHAR(16) NOT NULL DEFAULT 'tcp' COMMENT 'V2ray传输协议' AFTER `v2_port`;
-
--- 加入V2ray伪装类型
-ALTER TABLE `ss_node`
-	ADD COLUMN `v2_type` VARCHAR(32) NOT NULL DEFAULT 'none' COMMENT 'V2ray伪装类型' AFTER `v2_net`;
-
--- 加入V2ray伪装的域名
-ALTER TABLE `ss_node`
-	ADD COLUMN `v2_host` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'V2ray伪装的域名' AFTER `v2_type`;
-
--- 加入V2rayWS/H2路径
-ALTER TABLE `ss_node`
-	ADD COLUMN `v2_path` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'V2ray WS/H2路径' AFTER `v2_host`;
-
--- 加入V2ray底层传输安全
-ALTER TABLE `ss_node`
-	ADD COLUMN `v2_tls` TINYINT(4) NOT NULL DEFAULT '0' COMMENT 'V2ray底层传输安全 0 未开启 1 开启' AFTER `v2_path`;
-
--- 加入VmessId
-ALTER TABLE `user`
-	ADD COLUMN `vmess_id` varchar(64) NOT NULL DEFAULT '' COMMENT 'V2ray用户ID' AFTER `passwd`;

+ 0 - 10
sql/update/20181027.sql

@@ -1,10 +0,0 @@
--- 节点各个端口的连接IP记录表(由节点每60秒上报一次)
-CREATE TABLE `ss_node_ip` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
-  `port` int(11) NOT NULL DEFAULT '0' COMMENT '端口',
-  `type` char(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'tcp' COMMENT '类型:tcp、udp',
-  `ip` text COLLATE utf8mb4_unicode_ci COMMENT '连接IP:每个IP用,号隔开',
-  `created_at` int(11) NOT NULL DEFAULT '0' COMMENT '上报时间',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

+ 0 - 3
sql/update/20181031.sql

@@ -1,3 +0,0 @@
--- 商品表加入是否限购字段
-ALTER TABLE `goods`
-	ADD COLUMN `is_limit` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否限购:0-否、1-是' AFTER `sort`;

+ 0 - 21
sql/update/20181106.sql

@@ -1,21 +0,0 @@
--- 增加‘验证注册验证码’开关
-INSERT INTO `config` values ('71', 'is_verify_register', 0);
-
--- user_id 字段改为 type 字段
-ALTER TABLE `email_log`
-	CHANGE COLUMN `user_id` `type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '类型:1-邮件、2-serverChan' AFTER `id`;
-
--- 增加address字段
-ALTER TABLE `email_log`
-  ADD COLUMN `address` VARCHAR(255) NOT NULL COMMENT '收信地址' AFTER `type`;
-
--- 增加注册验证码表
-CREATE TABLE `verify_code` (
-	`id` INT(11) NOT NULL AUTO_INCREMENT,
-	`username` VARCHAR(128) NOT NULL COMMENT '用户邮箱' COLLATE 'utf8mb4_unicode_ci',
-	`code` CHAR(6) NOT NULL COMMENT '验证码' COLLATE 'utf8mb4_unicode_ci',
-	`status` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未使用、1-已使用、2-已失效',
-	`created_at` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
-	`updated_at` DATETIME NULL DEFAULT NULL COMMENT '最后更新时间',
-	PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='注册激活验证码';

+ 0 - 3
sql/update/20181115.sql

@@ -1,3 +0,0 @@
--- 文章加入简介
-ALTER TABLE `article`
-  ADD COLUMN `summary` varchar(255) DEFAULT '' COMMENT '简介' AFTER `author`;

+ 0 - 4
sql/update/20181121.sql

@@ -1,4 +0,0 @@
--- 用户流量变动记录
-ALTER TABLE `user_traffic_modify_log`
-	CHANGE COLUMN `before` `before` BIGINT NOT NULL DEFAULT '0' COMMENT '操作前流量' AFTER `order_id`,
-	CHANGE COLUMN `after` `after` BIGINT NOT NULL DEFAULT '0' COMMENT '操作后流量' AFTER `before`;

+ 0 - 2
sql/update/20181130.sql

@@ -1,2 +0,0 @@
--- 节点每日报告
-INSERT INTO `config` values ('72', 'node_daily_report', 0);

+ 0 - 5
sql/update/20181204.sql

@@ -1,5 +0,0 @@
--- 混合订阅
-INSERT INTO `config` values ('73', 'mix_subscribe', 0);
-
--- 随机订阅
-INSERT INTO `config` values ('74', 'rand_subscribe', 0);

+ 0 - 2
sql/update/20181206.sql

@@ -1,2 +0,0 @@
--- 自定义订阅信息(用于在订阅顶部加入到期时间和剩余流量)
-INSERT INTO `config` values ('75', 'is_custom_subscribe', 0);

+ 0 - 9
sql/update/20181221.sql

@@ -1,9 +0,0 @@
--- 优化定时任务执行时间(统计流量)
-ALTER TABLE `user_traffic_log`
-	DROP INDEX `idx_user`,
-	DROP INDEX `idx_node`;
-
-ALTER TABLE `user_traffic_log`
-	DROP INDEX `idx_user_node`,
-	ADD INDEX `idx_user_node` (`user_id`, `log_time`, `node_id`) USING BTREE,
-	ADD INDEX `idx_node_time` (`node_id`, `log_time`);

+ 0 - 9
sql/update/20181222.sql

@@ -1,9 +0,0 @@
--- add alipay
-INSERT INTO `config` values ('76', 'is_alipay', 0);
-INSERT INTO `config` VALUES ('77', 'alipay_sign_type', 'MD5');
-INSERT INTO `config` VALUES ('78', 'alipay_partner', '');
-INSERT INTO `config` VALUES ('79', 'alipay_key', '');
-INSERT INTO `config` VALUES ('80', 'alipay_private_key', '');
-INSERT INTO `config` VALUES ('81', 'alipay_public_key', '');
-INSERT INTO `config` VALUES ('82', 'alipay_transport', 'http');
-INSERT INTO `config` VALUES ('83', 'alipay_currency', 'USD');