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.

upgrade.sql 4.2 kB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. use n9e_v5;
  2. insert into `role_operation`(role_name, operation) values('Guest', '/log/explorer');
  3. insert into `role_operation`(role_name, operation) values('Guest', '/trace/explorer');
  4. insert into `role_operation`(role_name, operation) values('Standard', '/log/explorer');
  5. insert into `role_operation`(role_name, operation) values('Standard', '/trace/explorer');
  6. insert into `role_operation`(role_name, operation) values('Standard', '/alert-rules-built-in');
  7. insert into `role_operation`(role_name, operation) values('Standard', '/dashboards-built-in');
  8. insert into `role_operation`(role_name, operation) values('Standard', '/trace/dependencies');
  9. alter table `board` add built_in tinyint(1) not null default 0 comment '0:false 1:true';
  10. alter table `board` add hide tinyint(1) not null default 0 comment '0:false 1:true';
  11. alter table `chart_share` add datasource_id bigint unsigned not null default 0;
  12. alter table `alert_rule` add datasource_ids varchar(255) not null default '';
  13. alter table `alert_rule` add rule_config text not null comment 'rule_config';
  14. alter table `alert_rule` add annotations text not null comment 'annotations';
  15. alter table `alert_mute` add datasource_ids varchar(255) not null default '';
  16. alter table `alert_mute` add periodic_mutes varchar(4096) not null default '';
  17. alter table `alert_mute` add mute_time_type tinyint(1) not null default 0;
  18. alter table `alert_subscribe` add datasource_ids varchar(255) not null default '';
  19. alter table `alert_subscribe` add prod varchar(255) not null default '';
  20. alter table `alert_subscribe` add webhooks text;
  21. alter table `alert_subscribe` add redefine_webhooks tinyint(1) default 0;
  22. alter table `alert_subscribe` add for_duration bigint not null default 0;
  23. alter table `target` add datasource_id bigint unsigned not null default 0;
  24. alter table `target` add offset bigint not null default 0;
  25. alter table `target` modify cluster varchar(128) not null default '';
  26. alter table `recording_rule` add datasource_ids varchar(255) default '';
  27. alter table `alert_cur_event` add datasource_id bigint unsigned not null default 0;
  28. alter table `alert_cur_event` add annotations text not null comment 'annotations';
  29. alter table `alert_cur_event` add rule_config text not null comment 'rule_config';
  30. alter table `alert_his_event` add datasource_id bigint unsigned not null default 0;
  31. alter table `alert_his_event` add annotations text not null comment 'annotations';
  32. alter table `alert_his_event` add rule_config text not null comment 'rule_config';
  33. alter table alerting_engines add datasource_id bigint unsigned not null default 0;
  34. CREATE TABLE `datasource`
  35. (
  36. `id` int unsigned NOT NULL AUTO_INCREMENT,
  37. `name` varchar(255) not null default '',
  38. `description` varchar(255) not null default '',
  39. `category` varchar(255) not null default '',
  40. `plugin_id` int unsigned not null default 0,
  41. `plugin_type` varchar(255) not null default '',
  42. `plugin_type_name` varchar(255) not null default '',
  43. `cluster_name` varchar(255) not null default '',
  44. `settings` text not null,
  45. `status` varchar(255) not null default '',
  46. `http` varchar(4096) not null default '',
  47. `auth` varchar(8192) not null default '',
  48. `created_at` bigint not null default 0,
  49. `created_by` varchar(64) not null default '',
  50. `updated_at` bigint not null default 0,
  51. `updated_by` varchar(64) not null default '',
  52. PRIMARY KEY (`id`)
  53. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
  54. CREATE TABLE `builtin_cate` (
  55. `id` bigint unsigned not null auto_increment,
  56. `name` varchar(191) not null,
  57. `user_id` bigint not null default 0,
  58. PRIMARY KEY (`id`)
  59. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
  60. CREATE TABLE `notify_tpl` (
  61. `id` bigint unsigned not null auto_increment,
  62. `channel` varchar(32) not null,
  63. `name` varchar(255) not null,
  64. `content` text not null,
  65. PRIMARY KEY (`id`),
  66. UNIQUE KEY (`channel`)
  67. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
  68. CREATE TABLE `sso_config` (
  69. `id` bigint unsigned not null auto_increment,
  70. `name` varchar(255) not null,
  71. `content` text not null,
  72. PRIMARY KEY (`id`),
  73. UNIQUE KEY (`name`)
  74. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;