-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhikaru.sql
303 lines (269 loc) · 11 KB
/
hikaru.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
-- --------------------------------------------------------
-- Host: 202.61.206.242
-- Server version: 10.3.31-MariaDB-0+deb10u1 - Debian 10
-- Server OS: debian-linux-gnu
-- HeidiSQL Version: 11.3.0.6295
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!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 */;
-- Dumping database structure for hikaru
CREATE DATABASE IF NOT EXISTS `hikaru` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `hikaru`;
-- Dumping structure for table hikaru.accounts
CREATE TABLE IF NOT EXISTS `accounts` (
`user_id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(26) NOT NULL DEFAULT '',
`email` varchar(128) NOT NULL DEFAULT '',
`password` varchar(64) NOT NULL DEFAULT '',
PRIMARY KEY (`user_id`) USING BTREE,
UNIQUE KEY `email` (`email`) USING BTREE,
UNIQUE KEY `username` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.active_tokens
CREATE TABLE IF NOT EXISTS `active_tokens` (
`user_id` int(10) NOT NULL,
`access_token` varchar(512) NOT NULL,
`refresh_token` varchar(512) NOT NULL DEFAULT '',
`expires_in` int(8) NOT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`access_token`) USING BTREE,
UNIQUE KEY `refresh_token` (`refresh_token`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.beatmaps
CREATE TABLE IF NOT EXISTS `beatmaps` (
`beatmapset_id` int(16) NOT NULL,
`difficulty_rating` float DEFAULT NULL,
`beatmap_id` int(11) NOT NULL AUTO_INCREMENT,
`mode` varchar(50) DEFAULT '',
`status` varchar(50) DEFAULT '',
`total_length` int(11) DEFAULT 0,
`user_id` int(11) DEFAULT 0,
`version` varchar(256) DEFAULT '0',
`accuracy` float DEFAULT 0,
`ar` float DEFAULT 0,
`bpm` float DEFAULT 0,
`is_convert` bit(1) DEFAULT b'0',
`count_circles` int(11) DEFAULT 0,
`count_sliders` int(11) DEFAULT 0,
`count_spinners` int(11) DEFAULT 0,
`cs` float DEFAULT 0,
`deleted_at` datetime DEFAULT '0000-00-00 00:00:00',
`drain` int(11) DEFAULT 0,
`hit_length` int(11) DEFAULT 0,
`is_scoreable` bit(1) DEFAULT b'0',
`last_updated` datetime DEFAULT '0000-00-00 00:00:00',
`mode_int` tinyint(4) DEFAULT 0,
`passcount` int(11) DEFAULT 0,
`playcount` int(11) DEFAULT 0,
`ranked` tinyint(2) DEFAULT 0,
`url` varchar(256) DEFAULT '0',
`checksum` varchar(256) DEFAULT '0',
`max_combo` int(11) DEFAULT NULL,
PRIMARY KEY (`beatmap_id`) USING BTREE,
UNIQUE KEY `beatmapset_id` (`beatmapset_id`,`beatmap_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3471416 DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.beatmapsets
CREATE TABLE IF NOT EXISTS `beatmapsets` (
`artist` varchar(128) DEFAULT NULL,
`artist_unicode` varchar(128) NOT NULL,
`cover_id` int(11) DEFAULT NULL,
`creator` varchar(32) NOT NULL,
`favorite_count` int(11) NOT NULL DEFAULT 0,
`hype` int(11) DEFAULT NULL,
`beatmapset_id` int(11) NOT NULL,
`nsfw` tinyint(1) NOT NULL DEFAULT 0,
`play_count` int(11) NOT NULL DEFAULT 0,
`source` varchar(64) DEFAULT NULL,
`status` varchar(32) NOT NULL DEFAULT 'graveyard',
`title` varchar(256) DEFAULT NULL,
`title_unicode` varchar(256) NOT NULL,
`track_id` int(11) DEFAULT NULL,
`user_id` int(11) NOT NULL,
`video` tinyint(1) NOT NULL DEFAULT 0,
`download_disabled` tinyint(1) NOT NULL DEFAULT 0,
`more_information` text DEFAULT NULL,
`bpm` float NOT NULL DEFAULT 0,
`can_be_hyped` tinyint(1) NOT NULL DEFAULT 0,
`discussion_enabled` tinyint(1) NOT NULL DEFAULT 0,
`discussion_locked` tinyint(1) NOT NULL DEFAULT 1,
`is_scoreable` tinyint(1) NOT NULL DEFAULT 0,
`last_updated` datetime DEFAULT NULL,
`nomination_current` int(11) NOT NULL DEFAULT 2,
`nomination_required` int(11) NOT NULL DEFAULT 2,
`ranked` tinyint(4) NOT NULL DEFAULT 0,
`ranked_date` datetime DEFAULT NULL,
`storyboard` tinyint(1) NOT NULL DEFAULT 0,
`submitted_date` datetime DEFAULT NULL,
`tags` text DEFAULT NULL,
PRIMARY KEY (`beatmapset_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.channels
CREATE TABLE IF NOT EXISTS `channels` (
`channel_id` int(11) NOT NULL,
`description` varchar(1024) DEFAULT NULL,
`icon` varchar(128) DEFAULT NULL,
`moderated` bit(1) DEFAULT NULL,
`name` varchar(64) DEFAULT NULL,
`type` varchar(16) DEFAULT NULL,
`target_1` int(11) DEFAULT NULL,
`target_2` int(11) DEFAULT NULL,
PRIMARY KEY (`channel_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.chat_presence
CREATE TABLE IF NOT EXISTS `chat_presence` (
`user_id` int(11) NOT NULL,
`channel_id` int(11) NOT NULL,
`last_read_id` int(11) DEFAULT 0,
`can_message` bit(1) DEFAULT NULL,
PRIMARY KEY (`channel_id`,`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.friends
CREATE TABLE IF NOT EXISTS `friends` (
`user_id` int(11) NOT NULL,
`friend_id` int(11) NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.groups
CREATE TABLE IF NOT EXISTS `groups` (
`group_id` int(11) NOT NULL AUTO_INCREMENT,
`identifier` text DEFAULT NULL,
`name` text DEFAULT NULL,
`short_name` tinytext DEFAULT NULL,
`playmodes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`has_playmodes` tinyint(1) NOT NULL DEFAULT 0,
`has_listing` tinyint(1) NOT NULL DEFAULT 0,
`is_probationary` tinyint(1) NOT NULL DEFAULT 0,
`colour` tinytext DEFAULT NULL,
PRIMARY KEY (`group_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.messages
CREATE TABLE IF NOT EXISTS `messages` (
`channel_id` int(3) DEFAULT NULL,
`message_id` int(3) NOT NULL AUTO_INCREMENT,
`user_id` int(10) DEFAULT NULL,
`timestamp` datetime DEFAULT NULL,
`message_content` varchar(512) DEFAULT NULL,
`is_action` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`message_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.mirror
CREATE TABLE IF NOT EXISTS `mirror` (
`id` int(11) NOT NULL,
`LM` datetime DEFAULT NULL,
`CD` text DEFAULT NULL,
`CL` int(11) DEFAULT NULL,
`CT` varchar(128) DEFAULT NULL,
`ETag` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.news
CREATE TABLE IF NOT EXISTS `news` (
`author` varchar(32) NOT NULL DEFAULT 'Hikaru Team',
`edit_url` varchar(512) DEFAULT NULL,
`first_image` varchar(512) DEFAULT NULL,
`id` int(10) NOT NULL AUTO_INCREMENT,
`preview` longtext DEFAULT NULL,
`published_at` datetime NOT NULL,
`slug` varchar(256) NOT NULL,
`title` varchar(256) NOT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.rankings
CREATE TABLE IF NOT EXISTS `rankings` (
`user_id` int(11) DEFAULT NULL,
`mode` varchar(50) DEFAULT NULL,
`pp` int(11) DEFAULT NULL,
`score` int(11) DEFAULT NULL,
`rank` int(11) DEFAULT NULL,
`score_rank` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.scores
CREATE TABLE IF NOT EXISTS `scores` (
`user_id` int(10) NOT NULL,
`score_id` int(10) NOT NULL AUTO_INCREMENT,
`beatmap_id` int(11) DEFAULT NULL,
`ruleset_id` int(10) NOT NULL DEFAULT 0,
`passed` tinyint(1) DEFAULT NULL,
`count_miss` int(8) DEFAULT NULL,
`count_meh` int(8) DEFAULT NULL,
`count_ok` int(8) DEFAULT NULL,
`count_good` int(8) DEFAULT NULL,
`count_great` int(8) DEFAULT NULL,
`perfect` tinyint(1) DEFAULT NULL,
`count_STM` int(8) DEFAULT NULL,
`count_STH` int(8) DEFAULT NULL,
`count_LTM` int(8) DEFAULT NULL,
`count_LTH` int(8) DEFAULT NULL,
`count_SB` int(8) DEFAULT NULL,
`count_LB` int(8) DEFAULT NULL,
`rank` varchar(2) DEFAULT NULL,
`total_score` int(7) DEFAULT NULL,
`pp` float DEFAULT NULL,
`max_combo` int(10) DEFAULT NULL,
`accuracy` float DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`user_best` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`score_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.users
CREATE TABLE IF NOT EXISTS `users` (
`avatar_url` varchar(256) DEFAULT 'https://a.hikaru.pw/1/default_av.jpg',
`country_code` varchar(2) DEFAULT NULL,
`country_name` varchar(128) DEFAULT NULL,
`user_id` int(10) NOT NULL,
`username` varchar(28) NOT NULL,
`is_active` tinyint(1) DEFAULT 1,
`is_bot` tinyint(1) DEFAULT 0,
`is_deleted` tinyint(1) DEFAULT 0,
`is_online` tinyint(1) DEFAULT 1,
`is_supporter` tinyint(4) DEFAULT 0,
`has_supported` tinyint(4) DEFAULT 0,
`global_rank` int(8) DEFAULT 0,
`pp` float DEFAULT 0,
`total_hits` int(16) DEFAULT 0,
`total_score` bigint(20) DEFAULT 0,
`play_time` int(11) DEFAULT 0,
`last_visit` datetime DEFAULT NULL,
`join_date` datetime DEFAULT NULL,
`playcount` int(11) DEFAULT 0,
`play_start` datetime DEFAULT NULL,
`current_ruleset` tinyint(4) DEFAULT NULL,
`active_id` int(11) DEFAULT NULL,
`active_bm_id` int(11) DEFAULT NULL,
`groups` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`pm_friends_only` tinyint(1) DEFAULT 0,
PRIMARY KEY (`user_id`) USING BTREE,
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table hikaru.websocket
CREATE TABLE IF NOT EXISTS `websocket` (
`connection_id` varchar(64) NOT NULL,
`connection_token` varchar(64) NOT NULL,
`user_id` int(11) NOT NULL,
`type` varchar(50) DEFAULT NULL,
PRIMARY KEY (`connection_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;