-- MySQL dump 10.13  Distrib 5.7.42, for Linux (x86_64)
--
-- Host: 192.168.0.210    Database: reghao_oss_tdb
-- ------------------------------------------------------
-- Server version	5.7.36

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `data_block`
--

DROP TABLE IF EXISTS `data_block`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `data_block` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `deleted` bit(1) NOT NULL DEFAULT b'0',
  `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `content_id` varchar(255) NOT NULL,
  `block_id` varchar(255) NOT NULL,
  `host` varchar(255) DEFAULT NULL,
  `absolute_path` varchar(255) NOT NULL COMMENT '本地文件绝对路径',
  `size` bigint(20) NOT NULL,
  `base_dir` varchar(255) DEFAULT NULL,
  `relative_dir` varchar(255) DEFAULT NULL,
  `index` int(11) DEFAULT NULL,
  `start` bigint(20) DEFAULT NULL,
  `end` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `content_id` (`content_id`) USING BTREE,
  KEY `absolute_path` (`absolute_path`),
  KEY `base_dir` (`base_dir`),
  KEY `relative_dir` (`relative_dir`),
  KEY `size` (`size`),
  KEY `base_dir_2` (`base_dir`,`relative_dir`)
) ENGINE=InnoDB AUTO_INCREMENT=7481756 DEFAULT CHARSET=utf8mb4 COMMENT='对象数据块';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `file_meta`
--

DROP TABLE IF EXISTS `file_meta`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `file_meta` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `deleted` bit(1) NOT NULL DEFAULT b'0',
  `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `object_name` varchar(255) NOT NULL,
  `object_id` varchar(255) NOT NULL,
  `pid` varchar(255) NOT NULL,
  `content_id` varchar(255) NOT NULL,
  `sha256sum` varchar(255) NOT NULL COMMENT '文件的 sha256sum 值',
  `filename` varchar(255) NOT NULL,
  `size` bigint(20) NOT NULL,
  `file_type` int(11) NOT NULL,
  `content_type` varchar(255) NOT NULL COMMENT 'http content-type',
  `scope` int(11) NOT NULL,
  `upload_by` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_rfuvf3osnlaakifjdao0a8e2x` (`object_name`) USING BTREE,
  UNIQUE KEY `object_id` (`object_id`) USING BTREE,
  KEY `sha256sum` (`sha256sum`) USING BTREE,
  KEY `file_type` (`file_type`),
  KEY `pid` (`pid`),
  KEY `filename` (`filename`),
  KEY `acl` (`scope`),
  KEY `content_id` (`content_id`),
  KEY `upload_by` (`upload_by`)
) ENGINE=InnoDB AUTO_INCREMENT=8188463 DEFAULT CHARSET=utf8mb4 COMMENT='对象元数据';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `file_multipart`
--

DROP TABLE IF EXISTS `file_multipart`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `file_multipart` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `deleted` bit(1) NOT NULL DEFAULT b'0',
  `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `content_id` varchar(255) NOT NULL,
  `absolute_path` varchar(255) NOT NULL,
  `sha256sum` varchar(255) NOT NULL COMMENT '文件的 sha256sum 值',
  `total_size` bigint(20) NOT NULL,
  `chunk_size` int(11) NOT NULL,
  `total_chunks` int(11) NOT NULL,
  `uploaded` bit(1) NOT NULL,
  `upload_by` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `sha256sum_uploadby` (`sha256sum`,`upload_by`) USING BTREE,
  UNIQUE KEY `content_id` (`content_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='分片文件';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `file_part`
--

DROP TABLE IF EXISTS `file_part`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `file_part` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `content_id` varchar(255) NOT NULL,
  `chunk_number` int(11) NOT NULL,
  `current_chunk_size` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `sha256sum` (`content_id`,`chunk_number`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COMMENT='分片文件';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2024-12-15 22:47:21
