-
Notifications
You must be signed in to change notification settings - Fork 16
/
dht.sql
108 lines (94 loc) · 2.82 KB
/
dht.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- 主机: localhost
-- 生成日期: 2022-07-26 18:31:21
-- 服务器版本: 5.6.50-log
-- PHP 版本: 8.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 utf8mb4 */;
--
-- 数据库: `dht`
--
-- --------------------------------------------------------
--
-- 表的结构 `bt`
--
CREATE TABLE `bt` (
`name` varchar(500) NOT NULL COMMENT '名称',
`keywords` varchar(250) DEFAULT NULL COMMENT '关键词',
`length` bigint(20) NOT NULL DEFAULT '0' COMMENT '文件大小',
`piece_length` int(11) NOT NULL DEFAULT '0' COMMENT '种子大小',
`infohash` char(40) NOT NULL COMMENT '种子哈希值',
`files` text COMMENT '文件列表',
`hits` int(11) NOT NULL DEFAULT '0' COMMENT '点击量',
`hot` int(11) NOT NULL DEFAULT '1' COMMENT '热度',
`time` datetime NOT NULL COMMENT '收录时间',
`lasttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '最后下载时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8
PARTITION BY KEY (infohash)
(
PARTITION p0 ENGINE=InnoDB,
PARTITION p1 ENGINE=InnoDB,
PARTITION p2 ENGINE=InnoDB,
PARTITION p3 ENGINE=InnoDB,
PARTITION p4 ENGINE=InnoDB,
PARTITION p5 ENGINE=InnoDB,
PARTITION p6 ENGINE=InnoDB,
PARTITION p7 ENGINE=InnoDB,
PARTITION p8 ENGINE=InnoDB,
PARTITION p9 ENGINE=InnoDB,
PARTITION p10 ENGINE=InnoDB,
PARTITION p11 ENGINE=InnoDB,
PARTITION p12 ENGINE=InnoDB,
PARTITION p13 ENGINE=InnoDB,
PARTITION p14 ENGINE=InnoDB,
PARTITION p15 ENGINE=InnoDB,
PARTITION p16 ENGINE=InnoDB,
PARTITION p17 ENGINE=InnoDB,
PARTITION p18 ENGINE=InnoDB,
PARTITION p19 ENGINE=InnoDB,
PARTITION p20 ENGINE=InnoDB,
PARTITION p21 ENGINE=InnoDB,
PARTITION p22 ENGINE=InnoDB,
PARTITION p23 ENGINE=InnoDB,
PARTITION p24 ENGINE=InnoDB,
PARTITION p25 ENGINE=InnoDB,
PARTITION p26 ENGINE=InnoDB,
PARTITION p27 ENGINE=InnoDB,
PARTITION p28 ENGINE=InnoDB,
PARTITION p29 ENGINE=InnoDB,
PARTITION p30 ENGINE=InnoDB
);
-- --------------------------------------------------------
--
-- 表的结构 `history`
--
CREATE TABLE `history` (
`infohash` char(40) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- 转储表的索引
--
--
-- 表的索引 `bt`
--
ALTER TABLE `bt`
ADD UNIQUE KEY `infohash` (`infohash`) USING BTREE,
ADD KEY `hot` (`hot`);
--
-- 表的索引 `history`
--
ALTER TABLE `history`
ADD PRIMARY KEY (`infohash`),
ADD UNIQUE KEY `infohash` (`infohash`) USING BTREE;
COMMIT;
/*!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 */;