123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- drop table if exists `cs_report_datasource`;
- CREATE TABLE `cs_report_datasource` (
- `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
- `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
- `ds_name` varchar(50) not null comment '连接名,用于显示',
- `ds_ip` varchar(50) DEFAULT NULL COMMENT 'ip地址',
- `ds_port` int DEFAULT NULL COMMENT '端口',
- `ds_db` varchar(50) DEFAULT NULL COMMENT '数据库名/influxdbV2-org',
- `ds_url` varchar(300) DEFAULT NULL COMMENT '连接url',
- `ds_user` varchar(50) DEFAULT NULL COMMENT '用户名',
- `ds_password` varchar(50) DEFAULT NULL COMMENT '数据库密码',
- `ds_type` int DEFAULT NULL COMMENT '数据源类型 0-mysql 1-es 2-influxdb',
- `flux_token` varchar(100) comment 'fluxV2版本的token值/userpass任选其一',
- `flux_v2_status` tinyint not null default 0 comment 'influxdb是否fluxV2版本',
- `remark` varchar(200) DEFAULT NULL COMMENT '备注',
- `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `create_user_id` bigint DEFAULT NULL COMMENT '创建人ID',
- PRIMARY KEY (`id`)
- ) comment '定制的数据源表';
- drop table if exists `cs_dsy_job`;
- CREATE TABLE `cs_dsy_job` (
- `id` int NOT NULL AUTO_INCREMENT,
- `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
- `category_id` int NOT NULL COMMENT '分类ID',
- `job_name` varchar(100) NOT NULL COMMENT '任务名称',
- `job_desc` varchar(500) DEFAULT NULL COMMENT '任务描述',
- `job_status` tinyint NOT NULL COMMENT '上线状态',
- `trigger_status` tinyint NOT NULL DEFAULT '0' COMMENT '调度状态',
- `job_cron` varchar(20) DEFAULT NULL COMMENT 'xxljob的任务Cron',
- `xxl_job_id` int DEFAULT NULL COMMENT 'xxljob的任务ID',
- `source_ds_id` int NOT NULL COMMENT '输入数据源ID',
- `source_ds_type` tinyint DEFAULT NULL COMMENT '输入数据源类型',
- `source_table_name` varchar(100) NOT NULL COMMENT '输入数据源表名',
- `target_ds_id` int NOT NULL COMMENT '目标数据源ID',
- `target_ds_type` tinyint DEFAULT NULL COMMENT '目标数据源类型',
- `target_table_name` varchar(100) NOT NULL COMMENT '目标数据源表名',
- `query_sql` longtext NOT NULL COMMENT '输入数据源的查询SQL',
- `column_json` text comment '字段映射json数组',
- `public_status` tinyint NOT NULL DEFAULT '0' COMMENT '公开状态(0-不公开/1-公开)',
- `create_time` datetime NOT NULL COMMENT '创建时间',
- `create_user_id` bigint NOT NULL COMMENT '创建人ID',
- `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- `update_user_id` bigint DEFAULT NULL COMMENT '更新人ID',
- `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
- PRIMARY KEY (`id`)
- ) COMMENT='定制的数据同步任务';
- drop table if exists `cs_dsy_job_category`;
- CREATE TABLE `cs_dsy_job_category` (
- `id` int NOT NULL AUTO_INCREMENT,
- `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
- `cate_name` varchar(50) NOT NULL COMMENT '分类名称',
- `parent_id` int NOT NULL DEFAULT '0' COMMENT '父级ID',
- `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
- `create_time` datetime NOT NULL COMMENT '创建时间',
- `create_user_id` bigint NOT NULL COMMENT '创建人ID',
- `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
- PRIMARY KEY (`id`)
- ) COMMENT='定制的数据同步任务分类';
- drop table if exists `cs_dsy_job_instance`;
- CREATE TABLE `cs_dsy_job_instance` (
- `id` int NOT NULL AUTO_INCREMENT,
- `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
- `job_id` int NOT NULL COMMENT '任务ID',
- `start_time` datetime DEFAULT NULL COMMENT '作业开始时间',
- `end_time` datetime DEFAULT NULL COMMENT '作业结束时间',
- `instance_run_type` tinyint NOT NULL COMMENT '作业运行类型(手动 自动)',
- `instance_status` tinyint NOT NULL COMMENT '作业状态',
- `err_msg` longtext COMMENT '错误描述',
- `read_row_count` bigint NOT NULL DEFAULT '0' COMMENT '读取行数',
- `write_row_count` bigint NOT NULL DEFAULT '0' COMMENT '写入行数',
- `error_row_count` bigint NOT NULL DEFAULT '0' COMMENT '错误行数',
- `source_table_name` varchar(100) DEFAULT NULL COMMENT '输入数据源表名',
- `target_table_name` varchar(100) DEFAULT NULL COMMENT '目标数据源表名',
- `create_time` datetime NOT NULL COMMENT '任务创建时间',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `job_id` (`job_id`)
- ) COMMENT='定制的数据同步任务实例';
- drop table if exists `cs_dsy_job_permission`;
- CREATE TABLE `cs_dsy_job_permission` (
- `id` int NOT NULL AUTO_INCREMENT,
- `job_id` int NOT NULL COMMENT '任务ID',
- `data_perm_id` int NOT NULL COMMENT '权限组ID',
- `create_time` datetime NOT NULL COMMENT '创建时间',
- `create_user_id` bigint NOT NULL COMMENT '创建人ID',
- `create_by` varchar(50) NOT NULL COMMENT '创建人',
- PRIMARY KEY (`id`)
- ) COMMENT='定制的数据同步任务权限组';
|