Skip to content

Commit

Permalink
[Fix-709] [catalog] Fix catalog SPI bug and sql bug (DataLinkDC#710)
Browse files Browse the repository at this point in the history
Co-authored-by: wenmo <32723967+wenmo@users.noreply.github.com>
  • Loading branch information
aiwenmo and aiwenmo authored Jul 11, 2022
1 parent 4aaea1a commit 713e65a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions dlink-doc/sql/dlinkmysqlcatalog.sql
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
drop table if exists `metadata_database`
drop table if exists `metadata_database`;
create table if not exists `metadata_database` (
`id` int(11) not null AUTO_INCREMENT COMMENT '主键',
`database_name` varchar(255) NOT NULL COMMENT '名称',
`description` varchar(255) null comment'描述',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='元数据对象信息'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='元数据对象信息';

drop table if exists `metadata_table`
drop table if exists `metadata_table`;
create table if not exists `metadata_table` (
`id` int(11) not null AUTO_INCREMENT COMMENT '主键',
`table_name` varchar(255) NOT NULL COMMENT '名称',
Expand All @@ -18,29 +18,29 @@ create table if not exists `metadata_table` (
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='元数据对象信息'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='元数据对象信息';

drop table if exists `metadata_database_property`
drop table if exists `metadata_database_property`;
create table if not exists `metadata_database_property` (
`key` varchar(255) NOT NULL COMMENT '属性key',
`value` varchar(255) NULL COMMENT '属性value',
`database_id` int(11) not null COMMENT '数据库主键',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`key`, `database_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='元数据属性信息'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='元数据属性信息';

drop table if exists `metadata_table_property`
drop table if exists `metadata_table_property`;
create table if not exists `metadata_table_property` (
`key` varchar(255) NOT NULL COMMENT '属性key',
`value` varchar(255) NULL COMMENT '属性value',
`table_id` int(11) not null COMMENT '数据表名称',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`key`, `table_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='元数据属性信息'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='元数据属性信息';

drop table if exists metadata_column
drop table if exists metadata_column;
create table if not exists `metadata_column` (
`column_name` varchar(255) NOT NULL COMMENT '列名',
`column_type` varchar(255) NOT NULL COMMENT '列类型, 有Physical Metadata Computed WATERMARK ',
Expand All @@ -52,9 +52,9 @@ create table if not exists `metadata_column` (
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`table_id`,`column_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数据列信息'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数据列信息';

drop table if exists `metadata_function`
drop table if exists `metadata_function`;
create table if not exists `metadata_function` (
`id` int(11) not null AUTO_INCREMENT COMMENT '主键',
`function_name` varchar(255) NOT NULL COMMENT '名称',
Expand All @@ -64,4 +64,4 @@ create table if not exists `metadata_function` (
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='UDF信息'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='UDF信息';

0 comments on commit 713e65a

Please sign in to comment.