灵活用工后台
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

6pigxx_config.sql 27 KiB

hace 4 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. USE pigxx_config;
  2. SET NAMES utf8mb4;
  3. SET FOREIGN_KEY_CHECKS = 0;
  4. -- ----------------------------
  5. -- Table structure for config_info
  6. -- ----------------------------
  7. DROP TABLE IF EXISTS `config_info`;
  8. CREATE TABLE `config_info` (
  9. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  10. `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  11. `group_id` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  12. `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
  13. `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
  14. `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  15. `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  16. `src_user` text COLLATE utf8_bin COMMENT 'source user',
  17. `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
  18. `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  19. `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  20. `c_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL,
  21. `c_use` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  22. `effect` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  23. `type` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  24. `c_schema` text COLLATE utf8_bin,
  25. PRIMARY KEY (`id`),
  26. UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
  27. ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';
  28. -- ----------------------------
  29. -- Records of config_info
  30. -- ----------------------------
  31. BEGIN;
  32. INSERT INTO `config_info` VALUES (1, 'application-dev.yml', 'DEFAULT_GROUP', 'jasypt:\n encryptor:\n password: pigx\n \nspring:\n redis:\n host: pigx-redis\n servlet:\n multipart:\n max-file-size: 100MB\n max-request-size: 100MB\n cloud:\n sentinel:\n eager: true\n filter:\n url-patterns: /** \n transport:\n dashboard: pigx-sentinel:5020\n \nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n endpoint:\n health:\n show-details: ALWAYS\n\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n\nribbon:\n ReadTimeout: 10000\n ConnectTimeout: 10000\n\n#开启灰度\ngray:\n rule:\n enabled: true\n\nmybatis-plus:\n tenant-enable: ture\n mapper-locations: classpath:/mapper/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: auto\n field-strategy: NOT_EMPTY\n type-handlers-package: com.pig4cloud.pigx.common.data.handler\n\nswagger:\n title: PigX Swagger API\n license: Powered By PigX\n licenseUrl: https://pig4cloud.com/\n terms-of-service-url: https://pig4cloud.com/\n contact:\n email: wangiegie@gmail.com\n url: https://pig4cloud.com/about.html\n authorization:\n name: pigX OAuth\n auth-regex: ^.*$\n authorization-scope-list:\n - scope: server\n description: server all\n token-url-list:\n - http://${GATEWAY_HOST:pigx-gateway}:${GATEWAY_PORT:9999}/auth/oauth/token\n\nsecurity:\n oauth2:\n client:\n ignore-urls:\n - /actuator/**\n - /v2/api-docs\n resource:\n loadBalanced: true\n token-info-uri: http://pigx-auth/oauth/check_token', '49acefd4a4f32805e0f0c71cd6c3c925', '2019-04-18 02:10:20', '2020-06-06 11:27:34', NULL, '172.17.0.156', '', '', '通用配置文件', 'null', 'null', 'yaml', 'null');
  33. INSERT INTO `config_info` VALUES (2, 'pigx-auth-dev.yml', 'DEFAULT_GROUP', '# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n freemarker:\n allow-request-override: false\n allow-session-override: false\n cache: true\n charset: UTF-8\n check-template-location: true\n content-type: text/html\n enabled: true\n expose-request-attributes: false\n expose-session-attributes: false\n expose-spring-macro-helpers: true\n prefer-file-system-access: true\n suffix: .ftl\n template-loader-path: classpath:/templates/', 'a6674e6747c1a0bb6c6d78e13706f8f0', '2019-04-18 02:11:32', '2019-08-27 18:24:04', NULL, '127.0.0.1', '', '', '认证中心配置文件', 'null', 'null', 'yaml', 'null');
  34. INSERT INTO `config_info` VALUES (3, 'pigx-codegen-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_codegen}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\npigx:\n tenant:\n column: tenant_id\n tables:\n - gen_datasource_conf', 'b7d132a3ecdfac4252c994adbb65b23a', '2019-04-18 02:12:10', '2019-08-27 18:24:18', NULL, '127.0.0.1', '', '', '代码生成', 'null', 'null', 'yaml', 'null');
  35. INSERT INTO `config_info` VALUES (4, 'pigx-daemon-elastic-job-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n## 定时任务\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n\nxxl:\n job:\n admin:\n addresses: http://${XXL_HOST:pigx-xxl}:${XXL_HOST:9080}/xxl-job-admin', 'af2d24afd75cbd73c3bbc8297ca65bc9', '2019-04-18 02:12:57', '2020-04-15 21:56:37', NULL, '127.0.0.1', '', '', '定时任务-elastic-job配置', 'null', 'null', 'yaml', 'null');
  36. INSERT INTO `config_info` VALUES (5, 'pigx-gateway-dev.yml', 'DEFAULT_GROUP', 'security:\n encode:\n key: \'pigxpigxpigxpigx\'\n\nignore:\n clients:\n - test\n swagger-providers:\n - pigx-auth\n - pigx-tx-manager\n\nribbon:\n rule:\n gray-enabled: true\n\ncaptcha:\n water:\n mark: pig4cloud', 'de365170680d33a4c74ca41c6442b370', '2019-04-18 02:13:52', '2020-05-19 19:37:26', NULL, '172.17.0.156', '', '', '网关配置文件', 'null', 'null', 'yaml', 'null');
  37. INSERT INTO `config_info` VALUES (6, 'pigx-monitor-dev.yml', 'DEFAULT_GROUP', 'spring:\n # 安全配置\n security:\n user:\n name: ENC(rZHA4LW5hHmhLAAzJoFNag==) # pigx\n password: ENC(bjeyh+Aeii3kHXkoo00ZUw==) # pigx\n boot:\n admin:\n ui:\n title: \'pigx 服务状态监控\'\n brand: \'pigx 服务状态监控\'\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n endpoint:\n health:\n show-details: ALWAYS #显示详细信息', '7925a0c734460526262319b6a189e39d', '2019-04-18 02:14:17', '2019-12-31 19:04:00', NULL, '172.17.0.157', '', '', '监控配置文件', 'null', 'null', 'yaml', 'null');
  38. INSERT INTO `config_info` VALUES (7, 'pigx-upms-biz-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n client-secret: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n scope: server\n ignore-urls:\n - /druid/**\n - /actuator/**\n - /v2/api-docs\n\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n stat-view-servlet:\n enabled: true\n url-pattern: /druid/*\n #login-username: admin\n #login-password: admin\n filter:\n stat:\n enabled: true\n log-slow-sql: true\n slow-sql-millis: 10000\n merge-sql: false\n wall:\n config:\n multi-statement-allow: true\n\n# 文件系统 (提供测试环境,不要乱传)\noss:\n endpoint: http://minio.pig4cloud.com\n access-key: lengleng\n secret-key: lengleng\n bucket-name: lengleng\n\n# Logger Config\nlogging:\n level:\n com.pig4cloud.pigx.admin.mapper: debug\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - sys_user\n - sys_role\n - sys_menu\n - sys_dept\n - sys_log\n - sys_social_details\n - sys_dict\n - sys_dict_item\n - sys_public_param\n - sys_log\n - sys_file\n - sys_oauth_client_details', '28050ed1a6ec147346048fd444a94dc0', '2019-04-18 02:32:44', '2020-05-30 12:25:59', NULL, '172.17.0.156', '', '', 'admin 服务配置', 'null', 'null', 'yaml', 'null');
  39. INSERT INTO `config_info` VALUES (8, 'pigx-tx-manager-dev.yml', 'DEFAULT_GROUP', '# 页面配置\nspring:\n mvc:\n static-path-pattern: /**\n resources:\n static-locations: classpath:/static/\n\n\n# LCN 配置\ntm:\n transaction:\n netty:\n delaytime: 5 # 客户端链接最大通讯时间 (秒)\n hearttime: 15 # 客户端心跳时间 (秒)\n redis:\n savemaxtime: 30 # redis 保存时间 (秒)\n socket:\n port: 9998 # 通讯端口\n maxconnection: 1000 #最大链接数\n compensate:\n auto: false #是否自动补偿\n notifyUrl: http://ip:port/path #补偿结果通知(配消息总线里面)\n tryTime: 30 # z再次重试时间间隔\n maxWaitTime: 5000 # 请求超时的最大时间 (毫秒)', '885f5c125f2df7a08692929ccce154be', '2019-04-18 02:54:03', '2019-04-18 02:54:03', NULL, '127.0.0.1', '', '', '分布式事务协调模块', NULL, NULL, 'yaml', NULL);
  40. INSERT INTO `config_info` VALUES (9, 'pigx-daemon-quartz-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n resources:\n static-locations: classpath:/static/,classpath:/views/\n quartz:\n #相关属性配置\n properties:\n org:\n quartz:\n scheduler:\n instanceName: clusteredScheduler\n instanceId: AUTO\n jobStore:\n class: org.quartz.impl.jdbcjobstore.JobStoreTX\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n clusterCheckinInterval: 10000\n useProperties: false\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 50\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n #数据库方式\n job-store-type: jdbc\n #初始化表结构\n #jdbc:\n #initialize-schema: never\n\n', '276cf549fb8b084e35dc07d1eb309932', '2019-04-18 03:08:34', '2019-08-27 18:25:41', NULL, '127.0.0.1', '', '', 'quartz 配置文件', 'null', 'null', 'yaml', 'null');
  41. INSERT INTO `config_info` VALUES (10, 'pigx-pay-platform-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_pay}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n\n# 租户表维护\npigx:\n pay:\n test: lengleng\n aliPayConfig:\n expire-time: 30\n return-url: http://pig4cloud.com\n notify-url: https://admin.pig4cloud.com/pay/notify/ali/callbak\n wxPayConfig:\n notify-url: https://admin.pig4cloud.com/pay/notify/wx/callbak\n xsequence: #发号器相关配置\n db:\n retry-times: 3\n table-name: pay_sequence\n tenant:\n column: tenant_id\n tables:\n - pay_channel\n - pay_trade_order\n - pay_goods_order\n - pay_notify_record', 'bf185a74bb9af224bfe7f8f52ae3c9cb', '2019-05-28 11:46:27', '2019-08-27 18:26:01', NULL, '127.0.0.1', '', '', '支付模块配置', 'null', 'null', 'yaml', 'null');
  42. INSERT INTO `config_info` VALUES (11, 'pigx-oa-platform-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n ignore-urls:\n - \'/actuator/**\'\n - \'/v2/api-docs\'\n - \'/editor-app/**\'\n - \'/modeler.html\'\n - \'/ws/**\'\nspring:\n autoconfigure:\n exclude: org.activiti.spring.boot.SecurityAutoConfiguration\n activiti:\n check-process-definitions: false\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_ac}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - oa_leave_bill', 'bb2ee29e458875b0334e9f204f958272', '2019-10-16 16:38:52', '2019-10-16 16:38:52', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, 'yaml', NULL);
  43. INSERT INTO `config_info` VALUES (12, 'pigx-mp-platform-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(vW+Nup9LaTfIFwgufUBsYg==)\n client-secret: ENC(vW+Nup9LaTfIFwgufUBsYg==)\n scope: server\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_mp}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - wx_mp_menu\n - wx_account\n - wx_account_fans\n - wx_msg\n - wx_auto_reply', 'b179debedf55403402031192824a251e', '2019-10-21 08:58:24', '2020-06-09 15:04:07', NULL, '172.17.0.156', '', '', 'null', 'null', 'null', 'yaml', 'null');
  44. COMMIT;
  45. -- ----------------------------
  46. -- Table structure for config_info_aggr
  47. -- ----------------------------
  48. DROP TABLE IF EXISTS `config_info_aggr`;
  49. CREATE TABLE `config_info_aggr` (
  50. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  51. `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  52. `group_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  53. `datum_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'datum_id',
  54. `content` longtext COLLATE utf8_bin NOT NULL COMMENT '内容',
  55. `gmt_modified` datetime NOT NULL COMMENT '修改时间',
  56. `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  57. `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  58. PRIMARY KEY (`id`),
  59. UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)
  60. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段';
  61. -- ----------------------------
  62. -- Table structure for config_info_beta
  63. -- ----------------------------
  64. DROP TABLE IF EXISTS `config_info_beta`;
  65. CREATE TABLE `config_info_beta` (
  66. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  67. `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  68. `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  69. `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
  70. `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
  71. `beta_ips` varchar(1024) COLLATE utf8_bin DEFAULT NULL COMMENT 'betaIps',
  72. `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
  73. `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  74. `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  75. `src_user` text COLLATE utf8_bin COMMENT 'source user',
  76. `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
  77. `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  78. PRIMARY KEY (`id`),
  79. UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
  80. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta';
  81. -- ----------------------------
  82. -- Table structure for config_info_tag
  83. -- ----------------------------
  84. DROP TABLE IF EXISTS `config_info_tag`;
  85. CREATE TABLE `config_info_tag` (
  86. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  87. `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  88. `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  89. `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
  90. `tag_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_id',
  91. `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
  92. `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
  93. `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
  94. `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  95. `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  96. `src_user` text COLLATE utf8_bin COMMENT 'source user',
  97. `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
  98. PRIMARY KEY (`id`),
  99. UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)
  100. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag';
  101. -- ----------------------------
  102. -- Table structure for config_tags_relation
  103. -- ----------------------------
  104. DROP TABLE IF EXISTS `config_tags_relation`;
  105. CREATE TABLE `config_tags_relation` (
  106. `id` bigint(20) NOT NULL COMMENT 'id',
  107. `tag_name` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_name',
  108. `tag_type` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'tag_type',
  109. `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  110. `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  111. `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
  112. `nid` bigint(20) NOT NULL AUTO_INCREMENT,
  113. PRIMARY KEY (`nid`),
  114. UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),
  115. KEY `idx_tenant_id` (`tenant_id`)
  116. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation';
  117. -- ----------------------------
  118. -- Table structure for group_capacity
  119. -- ----------------------------
  120. DROP TABLE IF EXISTS `group_capacity`;
  121. CREATE TABLE `group_capacity` (
  122. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  123. `group_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群',
  124. `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
  125. `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  126. `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
  127. `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值',
  128. `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
  129. `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  130. `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  131. `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  132. PRIMARY KEY (`id`),
  133. UNIQUE KEY `uk_group_id` (`group_id`)
  134. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表';
  135. -- ----------------------------
  136. -- Table structure for his_config_info
  137. -- ----------------------------
  138. DROP TABLE IF EXISTS `his_config_info`;
  139. CREATE TABLE `his_config_info` (
  140. `id` bigint(64) unsigned NOT NULL,
  141. `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  142. `data_id` varchar(255) COLLATE utf8_bin NOT NULL,
  143. `group_id` varchar(128) COLLATE utf8_bin NOT NULL,
  144. `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
  145. `content` longtext COLLATE utf8_bin NOT NULL,
  146. `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL,
  147. `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00',
  148. `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00',
  149. `src_user` text COLLATE utf8_bin,
  150. `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL,
  151. `op_type` char(10) COLLATE utf8_bin DEFAULT NULL,
  152. `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  153. PRIMARY KEY (`nid`),
  154. KEY `idx_gmt_create` (`gmt_create`),
  155. KEY `idx_gmt_modified` (`gmt_modified`),
  156. KEY `idx_did` (`data_id`)
  157. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造';
  158. -- ----------------------------
  159. -- Table structure for permissions
  160. -- ----------------------------
  161. DROP TABLE IF EXISTS `permissions`;
  162. CREATE TABLE `permissions` (
  163. `role` varchar(50) NOT NULL,
  164. `resource` varchar(512) NOT NULL,
  165. `action` varchar(8) NOT NULL,
  166. UNIQUE KEY `uk_role_permission` (`role`,`resource`,`action`)
  167. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  168. -- ----------------------------
  169. -- Table structure for roles
  170. -- ----------------------------
  171. DROP TABLE IF EXISTS `roles`;
  172. CREATE TABLE `roles` (
  173. `username` varchar(50) NOT NULL,
  174. `role` varchar(50) NOT NULL,
  175. UNIQUE KEY `uk_username_role` (`username`,`role`)
  176. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  177. -- ----------------------------
  178. -- Records of roles
  179. -- ----------------------------
  180. BEGIN;
  181. INSERT INTO `roles` VALUES ('nacos', 'ROLE_ADMIN');
  182. COMMIT;
  183. -- ----------------------------
  184. -- Table structure for tenant_capacity
  185. -- ----------------------------
  186. DROP TABLE IF EXISTS `tenant_capacity`;
  187. CREATE TABLE `tenant_capacity` (
  188. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  189. `tenant_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Tenant ID',
  190. `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
  191. `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  192. `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
  193. `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
  194. `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
  195. `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  196. `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  197. `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  198. PRIMARY KEY (`id`),
  199. UNIQUE KEY `uk_tenant_id` (`tenant_id`)
  200. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表';
  201. -- ----------------------------
  202. -- Table structure for tenant_info
  203. -- ----------------------------
  204. DROP TABLE IF EXISTS `tenant_info`;
  205. CREATE TABLE `tenant_info` (
  206. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  207. `kp` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'kp',
  208. `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
  209. `tenant_name` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_name',
  210. `tenant_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL COMMENT 'tenant_desc',
  211. `create_source` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'create_source',
  212. `gmt_create` bigint(20) NOT NULL COMMENT '创建时间',
  213. `gmt_modified` bigint(20) NOT NULL COMMENT '修改时间',
  214. PRIMARY KEY (`id`),
  215. UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`),
  216. KEY `idx_tenant_id` (`tenant_id`)
  217. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info';
  218. -- ----------------------------
  219. -- Table structure for users
  220. -- ----------------------------
  221. DROP TABLE IF EXISTS `users`;
  222. CREATE TABLE `users` (
  223. `username` varchar(50) NOT NULL,
  224. `password` varchar(500) NOT NULL,
  225. `enabled` tinyint(1) NOT NULL,
  226. PRIMARY KEY (`username`)
  227. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  228. -- ----------------------------
  229. -- Records of users
  230. -- ----------------------------
  231. BEGIN;
  232. INSERT INTO `users` VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', 1);
  233. COMMIT;
  234. SET FOREIGN_KEY_CHECKS = 1;