(improvement)(semantic) save metric default query config (#503)

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2023-12-13 21:29:15 +08:00
committed by GitHub
parent 2c7afd0d55
commit f89be48e98
24 changed files with 255 additions and 84 deletions

View File

@@ -159,21 +159,6 @@ CREATE TABLE `s2_database` (
);
COMMENT ON TABLE s2_database IS 'database instance table';
CREATE TABLE IF NOT EXISTS `s2_datasource` (
`id` INT NOT NULL AUTO_INCREMENT,
`model_id` INT NOT NULL ,
`name` varchar(255) NOT NULL ,
`biz_name` varchar(255) NOT NULL ,
`description` varchar(500) DEFAULT NULL ,
`created_at` TIMESTAMP NOT NULL ,
`created_by` varchar(100) NOT NULL ,
`updated_at` TIMESTAMP NOT NULL ,
`updated_by` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
);
COMMENT ON TABLE s2_datasource IS 'datasource table';
create table s2_auth_groups
(
group_id INT,
@@ -200,6 +185,7 @@ CREATE TABLE IF NOT EXISTS `s2_metric` (
`alias` varchar(500) DEFAULT NULL,
`tags` varchar(500) DEFAULT NULL,
`relate_dimensions` varchar(500) DEFAULT NULL,
`ext` LONGVARCHAR DEFAULT NULL ,
PRIMARY KEY (`id`)
);
COMMENT ON TABLE s2_metric IS 'metric information table';
@@ -245,7 +231,7 @@ create table s2_view_info
(
id INT auto_increment,
domain_id INT null,
type varchar(20) null comment 'datasource、dimension、metric',
type varchar(20) null comment 'model、dimension、metric',
config LONGVARCHAR null comment 'config detail',
created_at TIMESTAMP null,
created_by varchar(100) null,
@@ -540,4 +526,16 @@ CREATE TABLE `s2_collect` (
`create_time` TIMESTAMP,
`update_time` TIMESTAMP,
PRIMARY KEY (`id`)
);
);
CREATE TABLE `s2_metric_query_default_config` (
`id` bigint NOT NULL AUTO_INCREMENT,
`metric_id` bigint ,
`user_name` varchar(255) NOT NULL,
`default_config` varchar(1000) NOT NULL,
`created_at` TIMESTAMP null,
`updated_at` TIMESTAMP null,
`created_by` varchar(100) null,
`updated_by` varchar(100) not null,
PRIMARY KEY (`id`)
);