DROP TABLE if exists saas_data_source_cluster;

CREATE TABLE `saas_data_source_cluster` (
  `id` varchar(32) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '主键',
  `cluster_name` varchar(128) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '集群名称',
  `database_type` varchar(16) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '数据库类型',
  `isolation_level` varchar(16) COLLATE utf8mb4_bin NOT NULL DEFAULT 'I' COMMENT '数据隔离级别',
  `is_used` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已使用',
  `memo` varchar(512) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '描述说明',
  `created_by` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人',
  `created_time` datetime DEFAULT NULL COMMENT '创建时间',
  `updated_by` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新人',
  `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
  `is_enabled` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_data_source_cluster` (`cluster_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='数据库集群';

