· 7 years ago · Oct 01, 2018, 12:06 AM
1# HeidiSQL Dump
2#
3# --------------------------------------------------------
4# Host: localhost
5# Database: asagi
6# Server version: 5.7.17-log
7# Server OS: Win64
8# Target compatibility: mysqldump+mysqlcli 5.1
9# Target max_allowed_packet: 1073741824
10# HeidiSQL version: 4.0
11# Date/time: 2018-10-01 03:01:53
12# --------------------------------------------------------
13
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0*/;
15
16
17#
18# Database structure for database 'asagi'
19#
20
21DROP DATABASE IF EXISTS `asagi`;
22CREATE DATABASE `asagi` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */;
23
24USE `asagi`;
25
26
27#
28# Table structure for table 'v'
29#
30
31CREATE TABLE `v` (
32 `doc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
33 `media_id` int(10) unsigned NOT NULL DEFAULT '0',
34 `poster_ip` decimal(39,0) unsigned NOT NULL DEFAULT '0',
35 `num` int(10) unsigned NOT NULL,
36 `subnum` int(10) unsigned NOT NULL,
37 `thread_num` int(10) unsigned NOT NULL DEFAULT '0',
38 `op` tinyint(1) NOT NULL DEFAULT '0',
39 `timestamp` int(10) unsigned NOT NULL,
40 `timestamp_expired` int(10) unsigned NOT NULL,
41 `preview_orig` varchar(20) DEFAULT NULL,
42 `preview_w` smallint(5) unsigned NOT NULL DEFAULT '0',
43 `preview_h` smallint(5) unsigned NOT NULL DEFAULT '0',
44 `media_filename` text,
45 `media_w` smallint(5) unsigned NOT NULL DEFAULT '0',
46 `media_h` smallint(5) unsigned NOT NULL DEFAULT '0',
47 `media_size` int(10) unsigned NOT NULL DEFAULT '0',
48 `media_hash` varchar(25) DEFAULT NULL,
49 `media_orig` varchar(20) DEFAULT NULL,
50 `spoiler` tinyint(1) NOT NULL DEFAULT '0',
51 `deleted` tinyint(1) NOT NULL DEFAULT '0',
52 `capcode` varchar(1) NOT NULL DEFAULT 'N',
53 `email` varchar(100) DEFAULT NULL,
54 `name` varchar(100) DEFAULT NULL,
55 `trip` varchar(25) DEFAULT NULL,
56 `title` varchar(100) DEFAULT NULL,
57 `comment` text,
58 `delpass` tinytext,
59 `sticky` tinyint(1) NOT NULL DEFAULT '0',
60 `locked` tinyint(1) NOT NULL DEFAULT '0',
61 `poster_hash` varchar(8) DEFAULT NULL,
62 `poster_country` varchar(2) DEFAULT NULL,
63 `exif` text,
64 PRIMARY KEY (`doc_id`),
65 UNIQUE KEY `num_subnum_index` (`num`,`subnum`),
66 KEY `thread_num_subnum_index` (`thread_num`,`num`,`subnum`),
67 KEY `subnum_index` (`subnum`),
68 KEY `op_index` (`op`),
69 KEY `media_id_index` (`media_id`),
70 KEY `media_hash_index` (`media_hash`),
71 KEY `media_orig_index` (`media_orig`),
72 KEY `name_trip_index` (`name`,`trip`),
73 KEY `trip_index` (`trip`),
74 KEY `email_index` (`email`),
75 KEY `poster_ip_index` (`poster_ip`),
76 KEY `timestamp_index` (`timestamp`)
77) ENGINE=InnoDB AUTO_INCREMENT=6199682 DEFAULT CHARSET=utf8mb4;
78
79
80
81#
82# Table structure for table 'v_daily'
83#
84
85CREATE TABLE `v_daily` (
86 `day` int(10) unsigned NOT NULL,
87 `posts` int(10) unsigned NOT NULL,
88 `images` int(10) unsigned NOT NULL,
89 `sage` int(10) unsigned NOT NULL,
90 `anons` int(10) unsigned NOT NULL,
91 `trips` int(10) unsigned NOT NULL,
92 `names` int(10) unsigned NOT NULL,
93 PRIMARY KEY (`day`)
94) ENGINE=InnoDB DEFAULT CHARSET=utf8;
95
96
97
98#
99# Table structure for table 'v_deleted'
100#
101
102CREATE TABLE `v_deleted` (
103 `doc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
104 `media_id` int(10) unsigned NOT NULL DEFAULT '0',
105 `poster_ip` decimal(39,0) unsigned NOT NULL DEFAULT '0',
106 `num` int(10) unsigned NOT NULL,
107 `subnum` int(10) unsigned NOT NULL,
108 `thread_num` int(10) unsigned NOT NULL DEFAULT '0',
109 `op` tinyint(1) NOT NULL DEFAULT '0',
110 `timestamp` int(10) unsigned NOT NULL,
111 `timestamp_expired` int(10) unsigned NOT NULL,
112 `preview_orig` varchar(20) DEFAULT NULL,
113 `preview_w` smallint(5) unsigned NOT NULL DEFAULT '0',
114 `preview_h` smallint(5) unsigned NOT NULL DEFAULT '0',
115 `media_filename` text,
116 `media_w` smallint(5) unsigned NOT NULL DEFAULT '0',
117 `media_h` smallint(5) unsigned NOT NULL DEFAULT '0',
118 `media_size` int(10) unsigned NOT NULL DEFAULT '0',
119 `media_hash` varchar(25) DEFAULT NULL,
120 `media_orig` varchar(20) DEFAULT NULL,
121 `spoiler` tinyint(1) NOT NULL DEFAULT '0',
122 `deleted` tinyint(1) NOT NULL DEFAULT '0',
123 `capcode` varchar(1) NOT NULL DEFAULT 'N',
124 `email` varchar(100) DEFAULT NULL,
125 `name` varchar(100) DEFAULT NULL,
126 `trip` varchar(25) DEFAULT NULL,
127 `title` varchar(100) DEFAULT NULL,
128 `comment` text,
129 `delpass` tinytext,
130 `sticky` tinyint(1) NOT NULL DEFAULT '0',
131 `locked` tinyint(1) NOT NULL DEFAULT '0',
132 `poster_hash` varchar(8) DEFAULT NULL,
133 `poster_country` varchar(2) DEFAULT NULL,
134 `exif` text,
135 PRIMARY KEY (`doc_id`),
136 UNIQUE KEY `num_subnum_index` (`num`,`subnum`),
137 KEY `thread_num_subnum_index` (`thread_num`,`num`,`subnum`),
138 KEY `subnum_index` (`subnum`),
139 KEY `op_index` (`op`),
140 KEY `media_id_index` (`media_id`),
141 KEY `media_hash_index` (`media_hash`),
142 KEY `media_orig_index` (`media_orig`),
143 KEY `name_trip_index` (`name`,`trip`),
144 KEY `trip_index` (`trip`),
145 KEY `email_index` (`email`),
146 KEY `poster_ip_index` (`poster_ip`),
147 KEY `timestamp_index` (`timestamp`)
148) ENGINE=InnoDB AUTO_INCREMENT=5898629 DEFAULT CHARSET=utf8mb4;
149
150
151
152#
153# Table structure for table 'v_images'
154#
155
156CREATE TABLE `v_images` (
157 `media_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
158 `media_hash` varchar(25) NOT NULL,
159 `media` varchar(20) DEFAULT NULL,
160 `preview_op` varchar(20) DEFAULT NULL,
161 `preview_reply` varchar(20) DEFAULT NULL,
162 `total` int(10) unsigned NOT NULL DEFAULT '0',
163 `banned` smallint(5) unsigned NOT NULL DEFAULT '0',
164 PRIMARY KEY (`media_id`),
165 UNIQUE KEY `media_hash_index` (`media_hash`),
166 KEY `total_index` (`total`),
167 KEY `banned_index` (`banned`)
168) ENGINE=InnoDB AUTO_INCREMENT=1259985 DEFAULT CHARSET=utf8;
169
170
171
172#
173# Table structure for table 'v_threads'
174#
175
176CREATE TABLE `v_threads` (
177 `thread_num` int(10) unsigned NOT NULL,
178 `time_op` int(10) unsigned NOT NULL,
179 `time_last` int(10) unsigned NOT NULL,
180 `time_bump` int(10) unsigned NOT NULL,
181 `time_ghost` int(10) unsigned DEFAULT NULL,
182 `time_ghost_bump` int(10) unsigned DEFAULT NULL,
183 `time_last_modified` int(10) unsigned NOT NULL,
184 `nreplies` int(10) unsigned NOT NULL DEFAULT '0',
185 `nimages` int(10) unsigned NOT NULL DEFAULT '0',
186 `sticky` tinyint(1) NOT NULL DEFAULT '0',
187 `locked` tinyint(1) NOT NULL DEFAULT '0',
188 PRIMARY KEY (`thread_num`),
189 KEY `time_op_index` (`time_op`),
190 KEY `time_bump_index` (`time_bump`),
191 KEY `time_ghost_bump_index` (`time_ghost_bump`),
192 KEY `time_last_modified_index` (`time_last_modified`),
193 KEY `sticky_index` (`sticky`),
194 KEY `locked_index` (`locked`)
195) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
196
197
198
199#
200# Table structure for table 'v_users'
201#
202
203CREATE TABLE `v_users` (
204 `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
205 `name` varchar(100) NOT NULL DEFAULT '',
206 `trip` varchar(25) NOT NULL DEFAULT '',
207 `firstseen` int(11) NOT NULL,
208 `postcount` int(11) NOT NULL,
209 PRIMARY KEY (`user_id`),
210 UNIQUE KEY `name_trip_index` (`name`,`trip`),
211 KEY `firstseen_index` (`firstseen`),
212 KEY `postcount_index` (`postcount`)
213) ENGINE=InnoDB AUTO_INCREMENT=4637714 DEFAULT CHARSET=utf8mb4;
214
215/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS*/;