diff --git a/DataRoom/doc/init.sql b/DataRoom/doc/init.sql index f450ac01..22430661 100644 --- a/DataRoom/doc/init.sql +++ b/DataRoom/doc/init.sql @@ -132,6 +132,7 @@ CREATE TABLE `ds_datasource` ( `username` varchar(255) DEFAULT NULL COMMENT '用户名', `password` text COMMENT '密码', `module_code` varchar(255) DEFAULT NULL COMMENT '模块编码', + `table_name` varchar(255) DEFAULT NULL COMMENT '表名', `editable` tinyint(2) DEFAULT '0' COMMENT '是否可编辑,0 不可编辑 1 可编辑', `remark` varchar(255) DEFAULT NULL, `update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', diff --git a/DataRoom/doc/update.sql b/DataRoom/doc/update.sql index 055f2a0b..ac313a1c 100644 --- a/DataRoom/doc/update.sql +++ b/DataRoom/doc/update.sql @@ -1,10 +1,9 @@ --- 更新大屏配置的类名 +#20230621 配置表中的类名替换 UPDATE big_screen_page SET config = REPLACE(config, '"className":"com.gccloud.bigscreen', '"className":"com.gccloud.dataroom'); UPDATE big_screen_page SET config = REPLACE(config, '"className":"com.gccloud.dataroom.core.module.manage.dto.BigScreenPageDTO', '"className":"com.gccloud.dataroom.core.module.manage.dto.DataRoomPageDTO'); --- 新增数据集相关的表 - +#20230621 新增数据集相关的表 DROP TABLE IF EXISTS `ds_category_tree`; CREATE TABLE `ds_category_tree` ( `id` bigint(64) NOT NULL AUTO_INCREMENT COMMENT '主键', @@ -77,4 +76,31 @@ ALTER TABLE `ds_datasource` ADD COLUMN `update_by` bigint(64) NULL DEFAULT 2 COM ALTER TABLE `ds_dataset` ADD COLUMN `create_by` bigint(64) NULL DEFAULT 2 COMMENT '创建人' AFTER `del_flag`; ALTER TABLE `ds_dataset` ADD COLUMN `update_by` bigint(64) NULL DEFAULT 2 COMMENT '更新人' AFTER `create_by`; ALTER TABLE `ds_category_tree` ADD COLUMN `create_by` bigint(64) NULL DEFAULT 2 COMMENT '创建人' AFTER `del_flag`; -ALTER TABLE `ds_category_tree` ADD COLUMN `update_by` bigint(64) NULL DEFAULT 2 COMMENT '更新人' AFTER `create_by`; \ No newline at end of file +ALTER TABLE `ds_category_tree` ADD COLUMN `update_by` bigint(64) NULL DEFAULT 2 COMMENT '更新人' AFTER `create_by`; + + +# 20230710 添加数据集标签表 +DROP TABLE IF EXISTS `ds_label`; +CREATE TABLE `ds_label` ( + `id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT '主键', + `label_name` varchar(255) DEFAULT NULL COMMENT '标签名称', + `label_type` varchar(255) DEFAULT NULL COMMENT '标签类型', + `label_desc` varchar(255) DEFAULT NULL COMMENT '标签描述', + `update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', + `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `create_by` bigint(64) null default 2 comment '创建人', + `update_by` bigint(64) null default 2 comment '更新人', + `del_flag` tinyint(2) NOT NULL DEFAULT '0' COMMENT '删除标识', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_mysql500_ci COMMENT='标签'; + +DROP TABLE IF EXISTS `ds_dataset_label`; +CREATE TABLE `ds_dataset_label` ( + `id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT '主键', + `dataset_id` bigint(32) DEFAULT NULL COMMENT '数据集ID', + `label_id` bigint(32) DEFAULT NULL COMMENT '标签ID', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_mysql500_ci COMMENT='数据集与标签关联表'; + +# 20230710 数据源新增字段 +ALTER TABLE `ds_datasource` ADD COLUMN `table_name` varchar(255) DEFAULT NULL COMMENT '表名' AFTER `module_code`; \ No newline at end of file