You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

migrate.sql 1.8 kB

12345678910111213141516171819202122232425262728293031323334
  1. /* v7.0.0-beta.3 */
  2. CREATE TABLE `builtin_metrics` (
  3. `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'unique identifier',
  4. `collector` varchar(191) NOT NULL COMMENT 'type of collector',
  5. `typ` varchar(191) NOT NULL COMMENT 'type of metric',
  6. `name` varchar(191) NOT NULL COMMENT 'name of metric',
  7. `unit` varchar(191) NOT NULL COMMENT 'unit of metric',
  8. `lang` varchar(191) NOT NULL DEFAULT '' COMMENT 'language of metric',
  9. `note` varchar(4096) NOT NULL COMMENT 'description of metric in Chinese',
  10. `expression` varchar(4096) NOT NULL COMMENT 'expression of metric',
  11. `created_at` bigint NOT NULL DEFAULT 0 COMMENT 'create time',
  12. `created_by` varchar(191) NOT NULL DEFAULT '' COMMENT 'creator',
  13. `updated_at` bigint NOT NULL DEFAULT 0 COMMENT 'update time',
  14. `updated_by` varchar(191) NOT NULL DEFAULT '' COMMENT 'updater',
  15. PRIMARY KEY (`id`),
  16. UNIQUE KEY `idx_collector_typ_name` (`lang`,`collector`, `typ`, `name`),
  17. INDEX `idx_collector` (`collector`),
  18. INDEX `idx_typ` (`typ`),
  19. INDEX `idx_name` (`name`),
  20. INDEX `idx_lang` (`lang`)
  21. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  22. CREATE TABLE `metric_filter` (
  23. `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'unique identifier',
  24. `name` varchar(191) NOT NULL COMMENT 'name of metric filter',
  25. `configs` varchar(4096) NOT NULL COMMENT 'configuration of metric filter',
  26. `groups_perm` text,
  27. `create_at` bigint NOT NULL DEFAULT '0' COMMENT 'create time',
  28. `create_by` varchar(191) NOT NULL DEFAULT '' COMMENT 'creator',
  29. `update_at` bigint NOT NULL DEFAULT '0' COMMENT 'update time',
  30. `update_by` varchar(191) NOT NULL DEFAULT '' COMMENT 'updater',
  31. PRIMARY KEY (`id`),
  32. KEY `idx_name` (`name`)
  33. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;