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.8 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. insert into `role_operation`(role_name, operation) values('Standard', '/help/servers');
  10. insert into `role_operation`(role_name, operation) values('Standard', '/help/migrate');
  11. insert into `role_operation`(role_name, operation) values('Admin', '/help/source');
  12. insert into `role_operation`(role_name, operation) values('Admin', '/help/sso');
  13. insert into `role_operation`(role_name, operation) values('Admin', '/help/notification-tpls');
  14. insert into `role_operation`(role_name, operation) values('Admin', '/help/notification-settings');
  15. alter table `board` add built_in tinyint(1) not null default 0 comment '0:false 1:true';
  16. alter table `board` add hide tinyint(1) not null default 0 comment '0:false 1:true';
  17. alter table `chart_share` add datasource_id bigint unsigned not null default 0;
  18. alter table `alert_rule` add datasource_ids varchar(255) not null default '';
  19. alter table `alert_rule` add rule_config text not null comment 'rule_config';
  20. alter table `alert_rule` add annotations text not null comment 'annotations';
  21. alter table `alert_mute` add datasource_ids varchar(255) not null default '';
  22. alter table `alert_mute` add periodic_mutes varchar(4096) not null default '[]';
  23. alter table `alert_mute` add mute_time_type tinyint(1) not null default 0;
  24. alter table `alert_subscribe` add datasource_ids varchar(255) not null default '';
  25. alter table `alert_subscribe` add prod varchar(255) not null default '';
  26. alter table `alert_subscribe` add webhooks text;
  27. alter table `alert_subscribe` add redefine_webhooks tinyint(1) default 0;
  28. alter table `alert_subscribe` add for_duration bigint not null default 0;
  29. alter table `recording_rule` add datasource_ids varchar(255) default '';
  30. alter table `target` modify cluster varchar(128) not null default '';
  31. alter table `alert_cur_event` add datasource_id bigint unsigned not null default 0;
  32. alter table `alert_cur_event` add annotations text not null comment 'annotations';
  33. alter table `alert_cur_event` add rule_config text not null comment 'rule_config';
  34. alter table `alert_his_event` add datasource_id bigint unsigned not null default 0;
  35. alter table `alert_his_event` add annotations text not null comment 'annotations';
  36. alter table `alert_his_event` add rule_config text not null comment 'rule_config';
  37. alter table `alerting_engines` add datasource_id bigint unsigned not null default 0;
  38. alter table `alerting_engines` change cluster engine_cluster varchar(128) not null default '' comment 'n9e engine cluster';
  39. alter table `task_record` add event_id bigint not null comment 'event id' default 0;
  40. CREATE TABLE `datasource`
  41. (
  42. `id` int unsigned NOT NULL AUTO_INCREMENT,
  43. `name` varchar(255) not null default '',
  44. `description` varchar(255) not null default '',
  45. `category` varchar(255) not null default '',
  46. `plugin_id` int unsigned not null default 0,
  47. `plugin_type` varchar(255) not null default '',
  48. `plugin_type_name` varchar(255) not null default '',
  49. `cluster_name` varchar(255) not null default '',
  50. `settings` text not null,
  51. `status` varchar(255) not null default '',
  52. `http` varchar(4096) not null default '',
  53. `auth` varchar(8192) not null default '',
  54. `created_at` bigint not null default 0,
  55. `created_by` varchar(64) not null default '',
  56. `updated_at` bigint not null default 0,
  57. `updated_by` varchar(64) not null default '',
  58. PRIMARY KEY (`id`)
  59. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
  60. CREATE TABLE `builtin_cate` (
  61. `id` bigint unsigned not null auto_increment,
  62. `name` varchar(191) not null,
  63. `user_id` bigint not null default 0,
  64. PRIMARY KEY (`id`)
  65. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
  66. CREATE TABLE `notify_tpl` (
  67. `id` bigint unsigned not null auto_increment,
  68. `channel` varchar(32) not null,
  69. `name` varchar(255) not null,
  70. `content` text not null,
  71. PRIMARY KEY (`id`),
  72. UNIQUE KEY (`channel`)
  73. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
  74. CREATE TABLE `sso_config` (
  75. `id` bigint unsigned not null auto_increment,
  76. `name` varchar(191) not null,
  77. `content` text not null,
  78. PRIMARY KEY (`id`),
  79. UNIQUE KEY (`name`)
  80. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;