UpgradeSentry.sql 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. /*
  2. SQLyog Ultimate v9.10
  3. MySQL - 5.5.55-log : Database - hsdataplatform
  4. *********************************************************************
  5. */
  6. /*!40101 SET NAMES utf8 */;
  7. /*!40101 SET SQL_MODE=''*/;
  8. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  9. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  10. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  11. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  12. CREATE DATABASE /*!32312 IF NOT EXISTS*/`hsdataplatform` /*!40100 DEFAULT CHARACTER SET utf8 */;
  13. USE `hsdataplatform`;
  14. /*Table structure for table `admin` */
  15. DROP TABLE IF EXISTS `admin`;
  16. CREATE TABLE `admin` (
  17. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自动编号',
  18. `username` varchar(100) DEFAULT NULL COMMENT '用户名',
  19. `password` varchar(100) DEFAULT NULL COMMENT '密码',
  20. `salt` varchar(32) DEFAULT NULL COMMENT '盐',
  21. `showname` varchar(100) DEFAULT NULL COMMENT '显示名称',
  22. `accountlock` int(11) DEFAULT '0' COMMENT '是否锁定',
  23. `addtime` datetime DEFAULT NULL COMMENT '注册时间',
  24. PRIMARY KEY (`id`)
  25. ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
  26. /*Data for the table `admin` */
  27. insert into `admin`(`id`,`username`,`password`,`salt`,`showname`,`accountlock`,`addtime`) values (1,'admin','5549b337675c88342b3286d2898217e0','d293c7b755fb04c777ac4e89b5b19464','超级管理员',0,'2017-04-12 14:21:32'),(2,'mtas','5549b337675c88342b3286d2898217e0','d293c7b755fb04c777ac4e89b5b19464','MTAS管理员',0,'2017-04-25 09:08:53'),(3,'cts','5ebaf8cc4eb10b46aaa257303e54d759','1e347f992843f77ee3a2ca882692d6e2','订单管理员',0,NULL),(4,'koala','a633aa39ff9cc972e85bbf4a93ac93a7','44a8f66fd1ee03547e3861f85705aa28','鉴权管理员',0,'2017-04-26 09:20:18');
  28. /*Table structure for table `admin_role` */
  29. DROP TABLE IF EXISTS `admin_role`;
  30. CREATE TABLE `admin_role` (
  31. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  32. `roleid` bigint(20) DEFAULT NULL,
  33. `userid` bigint(20) DEFAULT NULL,
  34. PRIMARY KEY (`id`)
  35. ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
  36. /*Data for the table `admin_role` */
  37. insert into `admin_role`(`id`,`roleid`,`userid`) values (1,1,1),(5,4,3),(6,5,3),(7,3,2),(8,6,2),(16,5,13),(17,5,13),(18,5,13);
  38. /*Table structure for table `apply` */
  39. DROP TABLE IF EXISTS `apply`;
  40. CREATE TABLE `apply` (
  41. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自动编号',
  42. `projectName` varchar(32) DEFAULT NULL COMMENT '项目名称',
  43. `secretId` varchar(64) DEFAULT NULL COMMENT '秘钥Id',
  44. `secretKey` varchar(32) DEFAULT NULL COMMENT '秘钥',
  45. `apply` varchar(200) DEFAULT NULL COMMENT '申请人',
  46. `addtime` datetime DEFAULT NULL,
  47. PRIMARY KEY (`id`)
  48. ) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
  49. /*Data for the table `apply` */
  50. insert into `apply`(`id`,`projectName`,`secretId`,`secretKey`,`apply`,`addtime`) values (30,'testproject','zew2SWP1kXwk','61f19seERYHLXTYywJZpezLl4c5Q4ols',NULL,'2018-03-08 10:06:13');
  51. /*Table structure for table `cacheserver` */
  52. DROP TABLE IF EXISTS `cacheserver`;
  53. CREATE TABLE `cacheserver` (
  54. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '缓存服务器ID',
  55. `serverip` varchar(15) DEFAULT NULL COMMENT '服务器IP地址',
  56. `serverdescription` varchar(200) DEFAULT NULL COMMENT '服务器简介',
  57. `cachetype` int(11) DEFAULT '0' COMMENT '0 redis 1 memcache 2 mongo 3 other',
  58. `registertime` datetime DEFAULT NULL COMMENT '注册时间',
  59. PRIMARY KEY (`id`)
  60. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  61. /*Data for the table `cacheserver` */
  62. insert into `cacheserver`(`id`,`serverip`,`serverdescription`,`cachetype`,`registertime`) values (1,'192.168.107.112','客户端缓存',1,'2017-04-13 14:47:52'),(2,'192.168.107.112','鉴权服务缓存',0,'2017-04-13 14:48:13');
  63. /*Table structure for table `deployserver` */
  64. DROP TABLE IF EXISTS `deployserver`;
  65. CREATE TABLE `deployserver` (
  66. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  67. `productioncode` varchar(32) DEFAULT NULL COMMENT '项目唯一标识',
  68. `productionname` varchar(64) DEFAULT NULL COMMENT '项目名称',
  69. `serverip` varchar(15) DEFAULT NULL COMMENT '部署服务IP地址',
  70. `webdomain` varchar(64) DEFAULT NULL COMMENT '网站域名',
  71. `webdescript` varchar(255) DEFAULT NULL COMMENT '网站描述',
  72. `webvirtuepath` varchar(32) DEFAULT NULL COMMENT '网站虚拟路径',
  73. `websitedir` varchar(100) DEFAULT NULL COMMENT '网站物理路径',
  74. `ftpip` varchar(15) DEFAULT NULL COMMENT '网站FTP地址',
  75. `ftpport` varchar(10) DEFAULT NULL COMMENT 'ftp端口号',
  76. `ftpusername` varchar(32) DEFAULT NULL COMMENT 'ftp用户名',
  77. `ftppassword` varchar(128) DEFAULT NULL COMMENT 'ftp密码',
  78. `ftppath` varchar(100) DEFAULT NULL COMMENT 'ftp路径',
  79. `currentversion` varchar(64) DEFAULT NULL COMMENT '当前机器上的版本号',
  80. `addtime` datetime DEFAULT NULL COMMENT '服务器注册时间',
  81. PRIMARY KEY (`id`)
  82. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  83. /*Data for the table `deployserver` */
  84. /*Table structure for table `menu` */
  85. DROP TABLE IF EXISTS `menu`;
  86. CREATE TABLE `menu` (
  87. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自动编号',
  88. `menucode` varchar(32) DEFAULT NULL COMMENT '编码',
  89. `menuname` varchar(64) DEFAULT NULL COMMENT '标题',
  90. `menuicon` varchar(32) DEFAULT NULL COMMENT '图标',
  91. `menuaction` varchar(200) DEFAULT NULL COMMENT '连接',
  92. `menutype` int(11) DEFAULT '0' COMMENT '0:分组 1:菜单 2:功能 ',
  93. `menusequence` int(11) DEFAULT '0',
  94. `menushow` int(11) DEFAULT '1' COMMENT '0:隐藏 1:显示',
  95. `parentmenu` bigint(20) DEFAULT NULL COMMENT '父级菜单',
  96. `menushowtype` varchar(16) DEFAULT NULL COMMENT '展现形式',
  97. `addtime` datetime DEFAULT NULL,
  98. PRIMARY KEY (`id`)
  99. ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
  100. /*Data for the table `menu` */
  101. insert into `menu`(`id`,`menucode`,`menuname`,`menuicon`,`menuaction`,`menutype`,`menusequence`,`menushow`,`parentmenu`,`menushowtype`,`addtime`) values (8,'cache','缓存中心','fi-laptop','javascript:void(0);',0,2,1,NULL,NULL,'2017-04-13 11:16:23'),(9,'cachelist','缓存管理','fi-usb','/cache/view/profile.action',1,1,1,8,'tab','2017-04-13 11:18:03'),(19,'log','日志管理','fi-social-blogger','javascript:void(0);',0,7,1,NULL,NULL,'2017-11-14 15:40:19'),(20,'mtlog','客户端日志','fi-social-blogger','/log/view/mtlog.action',1,1,1,19,'tab','2017-11-14 15:40:21'),(21,'messagequeue','索引队列','fi-social-blogger','javascript:void(0);',0,8,1,NULL,NULL,'2017-12-06 09:56:04'),(22,'activemq','ActiveMQ','fi-social-blogger','/activemq/view/broker.action',1,1,1,21,'tab','2017-12-06 09:57:01'),(23,'solr','Solr管理','fi-social-blogger','/solr/view/broker.action',1,2,1,21,'tab','2017-12-06 11:16:40'),(29,'applyauth','申请授权','fi-social-blogger','/cts/view/apply.action',1,8,1,1,'tab','2018-03-07 11:10:45');
  102. /*Table structure for table `module_action` */
  103. DROP TABLE IF EXISTS `module_action`;
  104. CREATE TABLE `module_action` (
  105. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  106. `moduleid` bigint(20) DEFAULT NULL,
  107. `actionid` bigint(20) DEFAULT NULL,
  108. PRIMARY KEY (`id`)
  109. ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
  110. /*Data for the table `module_action` */
  111. /*Table structure for table `product` */
  112. DROP TABLE IF EXISTS `product`;
  113. CREATE TABLE `product` (
  114. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  115. `productcode` varchar(32) DEFAULT NULL,
  116. `productname` varchar(128) DEFAULT NULL,
  117. `productdomain` varchar(64) DEFAULT NULL,
  118. `addtime` datetime DEFAULT NULL,
  119. PRIMARY KEY (`id`)
  120. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  121. /*Data for the table `product` */
  122. /*Table structure for table `product_log` */
  123. DROP TABLE IF EXISTS `product_log`;
  124. CREATE TABLE `product_log` (
  125. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自动编号',
  126. `productname` varchar(100) DEFAULT NULL COMMENT '产品名称',
  127. `logcontent` varchar(500) DEFAULT NULL COMMENT '日志内容',
  128. `productnum` varchar(100) DEFAULT NULL COMMENT '显示名称',
  129. `addtime` varchar(100) DEFAULT NULL COMMENT '添加时间',
  130. PRIMARY KEY (`id`)
  131. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  132. /*Data for the table `product_log` */
  133. /*Table structure for table `queueserver` */
  134. DROP TABLE IF EXISTS `queueserver`;
  135. CREATE TABLE `queueserver` (
  136. `serverid` bigint(20) NOT NULL AUTO_INCREMENT,
  137. `servername` varchar(256) DEFAULT NULL,
  138. `servercode` varchar(64) DEFAULT NULL,
  139. `serverip` varchar(15) DEFAULT NULL,
  140. `port` int(11) DEFAULT '1099',
  141. `broker` varchar(64) DEFAULT 'localhost',
  142. `userproperties` varchar(256) DEFAULT NULL,
  143. `addtime` datetime DEFAULT NULL,
  144. PRIMARY KEY (`serverid`)
  145. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  146. /*Data for the table `queueserver` */
  147. insert into `queueserver`(`serverid`,`servername`,`servercode`,`serverip`,`port`,`broker`,`userproperties`,`addtime`) values (1,'107-112','107-112','192.168.107.112',8161,'localhost','9456b9f2d2b2faec31087c739653185c','2017-12-06 10:49:27'),(2,'100-150','10-150','192.168.100.150',8161,'localhost','9456b9f2d2b2faec31087c739653185c','2017-12-06 10:49:50');
  148. /*Table structure for table `role_module` */
  149. DROP TABLE IF EXISTS `role_module`;
  150. CREATE TABLE `role_module` (
  151. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  152. `roleid` bigint(20) DEFAULT NULL,
  153. `moduleid` bigint(20) DEFAULT NULL,
  154. PRIMARY KEY (`id`)
  155. ) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8;
  156. /*Data for the table `role_module` */
  157. insert into `role_module`(`id`,`roleid`,`moduleid`) values (8,1,8),(9,1,9);
  158. /*Table structure for table `role_module_action` */
  159. DROP TABLE IF EXISTS `role_module_action`;
  160. CREATE TABLE `role_module_action` (
  161. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  162. `rolemoduleid` bigint(20) DEFAULT NULL,
  163. `actionid` bigint(20) DEFAULT NULL,
  164. PRIMARY KEY (`id`)
  165. ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
  166. /*Data for the table `role_module_action` */
  167. /*Table structure for table `securekey` */
  168. DROP TABLE IF EXISTS `securekey`;
  169. CREATE TABLE `securekey` (
  170. `SecureKeyID` bigint(20) NOT NULL AUTO_INCREMENT,
  171. `UserName` varchar(255) DEFAULT NULL COMMENT '用户名',
  172. `SecureKey` varchar(64) DEFAULT NULL COMMENT '绑定的卡',
  173. `BindDateTime` datetime DEFAULT NULL COMMENT '绑定时间',
  174. `CycleStep` int(11) DEFAULT '0' COMMENT '循环布数',
  175. `SecureKeyType` int(11) DEFAULT '0' COMMENT '0:口令卡 1:动态口令',
  176. `SyncDateTime` datetime DEFAULT NULL COMMENT '上次同步时间',
  177. `ExpiresDateTime` datetime DEFAULT NULL COMMENT '过期时间',
  178. PRIMARY KEY (`SecureKeyID`),
  179. UNIQUE KEY `IDX_USERNAME` (`UserName`),
  180. KEY `IDX_SECUREKEY` (`SecureKey`),
  181. KEY `IDX_EXPIREDATETIME` (`ExpiresDateTime`)
  182. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  183. /*Data for the table `securekey` */
  184. insert into `securekey`(`SecureKeyID`,`UserName`,`SecureKey`,`BindDateTime`,`CycleStep`,`SecureKeyType`,`SyncDateTime`,`ExpiresDateTime`) values (1,'admin','1000180201155542938','2018-02-01 15:56:08',0,0,'2018-02-01 15:55:42','2019-02-01 15:56:08');
  185. /*Table structure for table `sentry_action` */
  186. DROP TABLE IF EXISTS `sentry_action`;
  187. CREATE TABLE `sentry_action` (
  188. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  189. `actioncode` varchar(16) DEFAULT NULL,
  190. `actionname` varchar(64) DEFAULT NULL,
  191. `actionico` varchar(16) DEFAULT NULL,
  192. `addtime` datetime DEFAULT NULL,
  193. PRIMARY KEY (`id`)
  194. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  195. /*Data for the table `sentry_action` */
  196. insert into `sentry_action`(`id`,`actioncode`,`actionname`,`actionico`,`addtime`) values (1,'view','浏览',NULL,'2017-04-20 09:03:16'),(2,'add','添加',NULL,'2017-04-20 09:03:32'),(3,'edit','修改',NULL,'2017-04-20 09:03:46'),(4,'delete','删除',NULL,'2017-04-20 09:04:08');
  197. /*Table structure for table `sentry_role` */
  198. DROP TABLE IF EXISTS `sentry_role`;
  199. CREATE TABLE `sentry_role` (
  200. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  201. `rolecode` varchar(16) DEFAULT NULL,
  202. `rolename` varchar(64) DEFAULT NULL,
  203. `parentid` bigint(20) DEFAULT NULL,
  204. `addtiime` datetime DEFAULT NULL,
  205. PRIMARY KEY (`id`)
  206. ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
  207. /*Data for the table `sentry_role` */
  208. insert into `sentry_role`(`id`,`rolecode`,`rolename`,`parentid`,`addtiime`) values (1,'admin','管理员',NULL,'2017-04-20 09:00:32'),(2,'cts','订单中心',NULL,'2017-04-24 14:20:45'),(3,'mtas-developer','客户端API',NULL,'2017-04-24 14:21:04'),(4,'cts-product','产品组',2,'2017-04-24 15:19:07'),(5,'cts-developer','开发组',2,'2017-04-24 15:42:03'),(6,'mtas-developer','开发组',3,'2017-04-24 16:42:13'),(7,'mtas-product','产品组',3,'2017-04-24 16:42:45'),(8,'koala','鉴权中心',NULL,'2017-04-25 14:45:03'),(9,'koala-developer','开发组',8,'2017-04-25 14:47:53'),(11,'mtas-push','消息推送',NULL,'2017-10-12 16:34:58'),(13,'push-developer','开发组',11,'2017-10-12 16:36:52'),(15,'push-producter','产品组',11,'2017-10-12 16:37:24'),(16,'kefu','客服人员',NULL,'2017-12-29 16:11:41'),(17,'kefuzu','客服组',16,'2017-12-29 16:12:26');
  209. /*Table structure for table `solrserver` */
  210. DROP TABLE IF EXISTS `solrserver`;
  211. CREATE TABLE `solrserver` (
  212. `solrsid` bigint(20) NOT NULL AUTO_INCREMENT,
  213. `solrcode` varchar(64) DEFAULT NULL,
  214. `solrname` varchar(256) DEFAULT NULL,
  215. `solrip` varchar(15) DEFAULT NULL,
  216. `solrservice` varchar(512) DEFAULT NULL,
  217. `solrentities` varchar(512) DEFAULT NULL,
  218. `addtime` datetime DEFAULT NULL,
  219. PRIMARY KEY (`solrsid`)
  220. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  221. /*Data for the table `solrserver` */
  222. insert into `solrserver`(`solrsid`,`solrcode`,`solrname`,`solrip`,`solrservice`,`solrentities`,`addtime`) values (1,'107-112','Solr-107-112','192.168.107.112','http://192.168.107.112:8080/solr','bianke:wenji;mt:magazine;favorites:collection','2017-12-07 10:43:50');
  223. /*Table structure for table `user_module` */
  224. DROP TABLE IF EXISTS `user_module`;
  225. CREATE TABLE `user_module` (
  226. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  227. `userid` bigint(20) DEFAULT NULL,
  228. `moduleid` bigint(20) DEFAULT NULL,
  229. PRIMARY KEY (`id`)
  230. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  231. /*Data for the table `user_module` */
  232. /*Table structure for table `versionfile` */
  233. DROP TABLE IF EXISTS `versionfile`;
  234. CREATE TABLE `versionfile` (
  235. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  236. `productcode` varchar(32) DEFAULT NULL COMMENT '产品标识',
  237. `version` varchar(64) DEFAULT NULL COMMENT '版本号',
  238. `filename` varchar(64) DEFAULT NULL COMMENT '产品文件名',
  239. `filepath` varchar(255) DEFAULT NULL COMMENT '存放路径',
  240. `addtime` datetime DEFAULT NULL COMMENT '添加日期',
  241. PRIMARY KEY (`id`)
  242. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  243. /*Data for the table `versionfile` */
  244. insert into `versionfile`(`id`,`productcode`,`version`,`filename`,`filepath`,`addtime`) values (1,'cnkicmps','V1.0','cmps201704181427','D:/website','2017-04-18 14:27:31'),(2,'cnkicmps','V1.0.1','cmps201704181500','D:/website','2017-04-18 14:30:42');
  245. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  246. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  247. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  248. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;