tuonq_config.sql 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : MariaDB
  4. Source Server Type : MySQL
  5. Source Server Version : 100408
  6. Source Host : 10.8.0.1:5201
  7. Source Schema : tuonq_config
  8. Target Server Type : MySQL
  9. Target Server Version : 100408
  10. File Encoding : 65001
  11. Date: 21/07/2020 22:53:30
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for common_config
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `common_config`;
  19. CREATE TABLE `common_config` (
  20. `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  21. `property` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性KEY',
  22. `prop_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性值,可以是json字符,使用方自行决定',
  23. `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性名称',
  24. `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '属性描述,介绍',
  25. `application` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应用名称,如果没有,则为公用的数据',
  26. `is_server` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否为服务端属性,如果是,则只有微服务能取到改数据,为否,则表示为前端网站',
  27. `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  28. `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  29. `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  30. PRIMARY KEY (`id`, `property`) USING BTREE
  31. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通用的配置表,这里一般为固定的数据,不会即时更新,需要客户端主动获取的配置信息;\r\n并且包含了微服务前端端,及通用的配置信息,后期可考虑针对某个角色,或者用户组' ROW_FORMAT = Compact;
  32. -- ----------------------------
  33. -- Table structure for properties
  34. -- ----------------------------
  35. DROP TABLE IF EXISTS `properties`;
  36. CREATE TABLE `properties` (
  37. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '该配置的id',
  38. `key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '该配置的key值',
  39. `value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '该资源的值',
  40. `application` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'application' COMMENT '该资源所属的应用,该字段表示所属的application,如果为空,则表示为通用配置',
  41. `profile` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'default' COMMENT '该资源的类别',
  42. `label` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'master' COMMENT '该资源的label',
  43. `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '该配置的人',
  44. `create_time` datetime(0) NULL DEFAULT NULL COMMENT '该信息的创建时间',
  45. `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  46. `update_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  47. `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '该信息的描述',
  48. `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注信息',
  49. PRIMARY KEY (`id`) USING BTREE
  50. ) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'spring config 配置中心的数据库配置,不基于Git 做配置中心,这样更合理,能自己做更充分的配置' ROW_FORMAT = Dynamic;
  51. -- ----------------------------
  52. -- Records of properties
  53. -- ----------------------------
  54. INSERT INTO `properties` VALUES (1, 'spring.dataSource.url', 'jdbc:mysql://192.168.42.1:5201/tuonq_config?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull', 'config', 'dev', 'master', '', '2019-08-22 16:19:09', '', '2019-08-22 17:12:16', '配置中心数据库连接', NULL);
  55. INSERT INTO `properties` VALUES (2, 'spring.dataSource', 'com.zaxxer.hikari.HikariDataSource', 'sys', 'dev', 'master', '', '2019-08-22 16:46:41', '', '2019-08-22 17:32:51', '数据库连接池类型,默认为HikariDataSource', NULL);
  56. INSERT INTO `properties` VALUES (3, 'spring.dataSource.driver-class-name', 'com.mysql.jdbc.Driver', 'application', 'dev', 'master', '', '2019-08-22 16:50:06', NULL, '2019-08-23 14:17:53', '数据库驱动', NULL);
  57. INSERT INTO `properties` VALUES (4, 'spring.dataSource.hikari.minimum-idle', '1', 'application', 'dev', 'master', '', '2019-08-22 16:50:31', '', '2019-08-23 14:18:01', '最小闲置连接数', NULL);
  58. INSERT INTO `properties` VALUES (5, 'spring.dataSource.hikari.maximum-pool-size', '6', 'application', 'dev', 'master', '', '2019-08-22 16:50:41', '', '2019-08-23 14:18:03', '连接池最大连接数量', NULL);
  59. INSERT INTO `properties` VALUES (6, 'spring.dataSource.hikari.auto-commit', 'true', 'application', 'dev', 'master', '', '2019-08-22 16:50:53', '', '2019-08-23 14:18:04', '忘记了是什么意思', NULL);
  60. INSERT INTO `properties` VALUES (7, 'spring.dataSource.hikari.idle-timeout', '60000', 'application', 'dev', 'master', '', '2019-08-22 16:51:04', '', '2019-08-23 14:18:06', '最长闲置时间', NULL);
  61. INSERT INTO `properties` VALUES (8, 'spring.dataSource.hikari.pool-name', 'DatebookHikariCP', 'application', 'dev', 'master', '', '2019-08-22 16:51:46', '', '2019-08-23 14:18:09', '数据库连接池名称,暂时不知道这个干嘛的', NULL);
  62. INSERT INTO `properties` VALUES (10, 'spring.jta.log-dir', '.logs/${spring.application.name}/jta', 'application', 'default', 'master', '', '2019-08-23 15:35:21', NULL, '2019-08-23 14:18:24', '不知道这种写法,能不能实现', NULL);
  63. -- ----------------------------
  64. -- Table structure for property_label
  65. -- ----------------------------
  66. DROP TABLE IF EXISTS `property_label`;
  67. CREATE TABLE `property_label` (
  68. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
  69. `label` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '本级标签字段',
  70. `path` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '整个路径,以.分割,主要是为了适应配置中心数据库的key值',
  71. `p_id` int(10) NOT NULL DEFAULT 0 COMMENT '父级ID',
  72. `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称',
  73. `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签简介',
  74. `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注信息',
  75. `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '添加人',
  76. `create_time` datetime(0) NULL DEFAULT current_timestamp() COMMENT '添加时间',
  77. PRIMARY KEY (`id`, `path`) USING BTREE
  78. ) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签,主要是用作提示,方便配置中心添加配置信息' ROW_FORMAT = Compact;
  79. -- ----------------------------
  80. -- Records of property_label
  81. -- ----------------------------
  82. INSERT INTO `property_label` VALUES (1, 'spring', 'spring', 0, 'Spring', '春天花会开,鸟儿自由自在', NULL, NULL, '2019-08-10 02:33:10');
  83. INSERT INTO `property_label` VALUES (2, 'dataSource', 'spring.dataSource', 1, '数据库配置项', '数据库配置项', NULL, NULL, '2019-08-10 02:39:16');
  84. INSERT INTO `property_label` VALUES (4, 'username', 'spring.dataSource.username', 2, '数据库连接用户名', '数据库连接的用户名', NULL, NULL, '2019-08-11 04:07:38');
  85. INSERT INTO `property_label` VALUES (7, 'password', 'spring.dataSource.password', 2, '密码', '密码,讲道理,密码不应该明文保存的', NULL, NULL, '2019-08-14 14:14:51');
  86. INSERT INTO `property_label` VALUES (8, 'url', 'spring.dataSource.url', 2, '连接路径', '讲真,这个有点烦呀', NULL, NULL, '2019-08-14 14:20:35');
  87. INSERT INTO `property_label` VALUES (9, 'redis', 'spring.redis', 1, 'redis缓存', 'redis 缓存父路径', NULL, NULL, '2019-08-14 14:22:00');
  88. INSERT INTO `property_label` VALUES (10, 'user', 'spring.redis.user', 9, '用户名', '不知道是不是这个', NULL, NULL, '2019-08-14 14:22:36');
  89. INSERT INTO `property_label` VALUES (11, 'password', 'spring.redis.password', 9, 'Redis密码', '密码,讲道理,密码不应该明文保存的', NULL, NULL, '2019-08-14 14:22:56');
  90. INSERT INTO `property_label` VALUES (12, 'host', 'spring.redis.host', 9, '路径,主机名', '主机名', NULL, NULL, '2019-08-14 14:23:21');
  91. INSERT INTO `property_label` VALUES (13, 'port', 'spring.redis.port', 9, '端口号,默认为6379', '端口号', NULL, NULL, '2019-08-14 14:23:55');
  92. INSERT INTO `property_label` VALUES (14, 'rabbitmq', 'spring.rabbitmq', 1, 'rabbitmq', 'rabbitmq', NULL, NULL, '2019-08-22 07:55:21');
  93. INSERT INTO `property_label` VALUES (15, 'jta', 'spring.jta', 1, 'jta', NULL, NULL, NULL, '2019-08-23 07:18:15');
  94. INSERT INTO `property_label` VALUES (16, 'log-dir', 'spring.jta.log-dir', 15, '日志地址', 'jta分布式事务的日志', NULL, NULL, '2019-08-23 07:18:57');
  95. INSERT INTO `property_label` VALUES (17, 'http', 'spring.http', 1, 'http', NULL, NULL, NULL, '2019-08-23 07:19:28');
  96. INSERT INTO `property_label` VALUES (18, 'converters', 'spring.http.converters', 17, '转换器', '什么鬼', NULL, NULL, '2019-08-23 07:19:49');
  97. INSERT INTO `property_label` VALUES (19, 'sentinel', 'spring.redis.sentinel', 9, '哨兵', '哨兵模式', NULL, NULL, '2019-08-25 02:40:05');
  98. INSERT INTO `property_label` VALUES (20, 'master', 'spring.redis.sentinel.master', 19, 'redis主从名称', NULL, NULL, NULL, '2019-08-25 02:40:41');
  99. INSERT INTO `property_label` VALUES (21, 'nodes', 'spring.redis.sentinel.nodes', 19, '哨兵配置', 'IP:PORT,多个用逗号隔开', NULL, NULL, '2019-08-25 02:42:05');
  100. SET FOREIGN_KEY_CHECKS = 1;