This repository was archived by the owner on Apr 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashbox-Clean.sql
More file actions
339 lines (302 loc) · 10.2 KB
/
dashbox-Clean.sql
File metadata and controls
339 lines (302 loc) · 10.2 KB
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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
/*!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 */;
CREATE database IF NOT EXISTS `Dashbox`;
USE `Dashbox`;
CREATE TABLE IF NOT EXISTS `accounts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userName` varchar(15) NOT NULL,
`password` binary(60) NOT NULL,
`verified` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Ignored if VerifyLevel Config is set to 0',
`disabled` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Not 1 if an IP is Temp-Blocked',
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `userName` (`userName`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8mb4 COMMENT='Some data upon registering is discarded';
CREATE TABLE IF NOT EXISTS `levels` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`accountID` int(11) NOT NULL,
`audioID` int(11) NOT NULL DEFAULT 0 COMMENT 'Vanilla Sound Track',
`songID` int(11) NOT NULL DEFAULT 0,
`difficulty` varchar(255) NOT NULL DEFAULT 'NA',
`demonDiff` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Only used if difficulty is Demon (10)',
`length` tinyint(1) NOT NULL DEFAULT 0,
`objects` tinyint(1) NOT NULL DEFAULT 0,
`coins` tinyint(1) NOT NULL DEFAULT 0,
`originalID` int(11) NOT NULL DEFAULT 0,
`originalReuploadID` int(11) DEFAULT NULL COMMENT 'For the Level Reupload Tool',
`extraString` varchar(255) DEFAULT NULL,
`downloads` int(11) NOT NULL DEFAULT 0,
`likes` int(11) NOT NULL DEFAULT 0,
`featureScoring` int(11) NOT NULL DEFAULT 0 COMMENT 'Prioritized ordering over uploadDate for Featured Tab',
`stars` int(11) NOT NULL DEFAULT 0,
`featured` tinyint(1) NOT NULL DEFAULT 0,
`epic` tinyint(1) NOT NULL DEFAULT 0,
`inHall` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Only used if configured',
`inMagic` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Only used if configured',
`bonusCP` int(11) NOT NULL DEFAULT 0,
`noCP` tinyint(1) NOT NULL DEFAULT 0,
`uploadDate` bigint(20) NOT NULL DEFAULT 0,
`updateDate` bigint(20) NOT NULL DEFAULT 0,
`rateDate` bigint(20) NOT NULL DEFAULT 0,
`requestedStars` tinyint(1) NOT NULL DEFAULT 0,
`hasLDM` tinyint(1) NOT NULL DEFAULT 0,
`password` int(6) NOT NULL DEFAULT 0,
`twoPlayer` tinyint(1) NOT NULL DEFAULT 0,
`unlisted` tinyint(1) NOT NULL DEFAULT 0,
`version` int(11) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Level Data is stored externally in /data';
CREATE TABLE IF NOT EXISTS `quests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text NOT NULL,
`requirement` int(11) NOT NULL COMMENT 'How much of type x to collect',
`reward` int(11) NOT NULL COMMENT 'How many diamonds rewarded',
`type` int(11) NOT NULL COMMENT '1 - orbs, 2 - coins, 3 - stars',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='Requires at least 3 Quests for those to display properly';
INSERT INTO `quests` (`id`, `name`, `requirement`, `reward`, `type`) VALUES
(1, 'Pool of Orbs', 100, 10, 1),
(2, 'Search for shiny Silvers', 3, 25, 2),
(3, 'Stargazer', 3, 10, 3),
(4, 'Snatching more Orbs', 250, 15, 1),
(5, 'Could it be Money?', 1, 10, 2),
(6, 'Star Catcher', 10, 50, 3);
CREATE TABLE IF NOT EXISTS `userdata` (
`id` int(11) NOT NULL,
`stars` int(11) NOT NULL DEFAULT 0,
`diamonds` int(11) NOT NULL DEFAULT 0,
`starCoins` int(11) NOT NULL DEFAULT 0,
`userCoins` int(11) NOT NULL DEFAULT 0,
`demons` int(11) NOT NULL DEFAULT 0,
`creatorPoints` int(11) NOT NULL DEFAULT 0,
`orbs` int(11) NOT NULL DEFAULT 0,
`completedLevels` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`IP` varchar(45) NOT NULL DEFAULT '127.0.0.1',
`friends` int(11) NOT NULL DEFAULT 0,
`mainIcon` int(11) NOT NULL DEFAULT 0 COMMENT 'Determines the Icon used for displaying in Comments, Leaderboards, etc.',
`player` int(11) NOT NULL DEFAULT 0 COMMENT '0',
`ship` int(11) NOT NULL DEFAULT 0 COMMENT '1',
`ball` int(11) NOT NULL DEFAULT 0 COMMENT '2',
`ufo` int(11) NOT NULL DEFAULT 0 COMMENT '3',
`wave` int(11) NOT NULL DEFAULT 0 COMMENT '4',
`robot` int(11) NOT NULL DEFAULT 0 COMMENT '5',
`spider` int(11) NOT NULL DEFAULT 0 COMMENT '6',
`glow` int(11) NOT NULL DEFAULT 0,
`explosion` int(11) NOT NULL DEFAULT 0,
`trail` int(11) NOT NULL DEFAULT 0,
`colour1` int(11) NOT NULL DEFAULT 0,
`colour2` int(11) NOT NULL DEFAULT 3,
`messages` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0 - All, 1 - Only Friends, 2 - Nobody',
`friendRequests` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0 - All, 1 - Nobody',
`comments` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0 - All, 1 - Only Friends, 2 - Nobody',
`youtube` varchar(255) NOT NULL DEFAULT '',
`twitter` varchar(255) NOT NULL DEFAULT '',
`twitch` varchar(255) NOT NULL DEFAULT '',
`creation` int(11) NOT NULL DEFAULT 0 COMMENT 'Account creation date',
`lastLogOn` int(11) NOT NULL DEFAULT 0,
`leaderboardBanned` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Not checked if the Account is disabled',
`creatorBanned` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'leaderboardBanned affects this',
`chest1` int(11) NOT NULL DEFAULT 0 COMMENT 'Timestamp',
`chest2` int(11) NOT NULL DEFAULT 0 COMMENT 'Timestamp',
`chestCount1` int(11) NOT NULL DEFAULT 0 COMMENT 'In-game chest ID',
`chestCount2` int(11) NOT NULL DEFAULT 0 COMMENT 'In-game chest ID',
`role` int(11) NOT NULL DEFAULT 0 COMMENT '0 - Base User, Other - Role Listed in "roles" Table',
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `leaderboardBanned` (`leaderboardBanned`),
KEY `creatorBanned` (`creatorBanned`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='This is not connected to the cloud save data';
CREATE TABLE IF NOT EXISTS `dailyquests` (
`id` int(11) NOT NULL,
`questID` int(11) NOT NULL,
`expire` int(11) NOT NULL DEFAULT 0 COMMENT "The timestamp that the quest will expire. This should theoretically be the same for all quests, I just don't know where else to store it",
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Only used for Daily Quests, otherwise this is unused';
/* This is absolutely required because otherwise quests will not update properly */
/* ??? qhar -rya */
INSERT INTO `dailyquests` (`id`, `questID`) VALUES
(1, 1),
(2, 2),
(3, 3);
CREATE TABLE IF NOT EXISTS `friendrequests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sender` int(11) NOT NULL DEFAULT 0,
`recipient` int(11) NOT NULL DEFAULT 0,
`comment` varchar(255) NOT NULL DEFAULT '',
`date` int(11) NOT NULL DEFAULT 0,
`new` tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='All friend requests between users';
CREATE TABLE IF NOT EXISTS `friends` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL DEFAULT 0,
`friend` int(11) NOT NULL DEFAULT 0,
`new` tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sender` int(11) NOT NULL DEFAULT 0,
`recipient` int(11) NOT NULL DEFAULT 0,
`date` int(11) NOT NULL DEFAULT 0,
`body` varchar(255) NOT NULL DEFAULT '',
`subject` varchar(255) NOT NULL DEFAULT '',
`new` tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `blocks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`blocked` int(11) NOT NULL DEFAULT 0,
`blockee` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `roles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL UNIQUE COMMENT "The name of the Role",
`rate` tinyint(1) NOT NULL DEFAULT 0 COMMENT "Star Rating",
`feature` tinyint(1) NOT NULL DEFAULT 0,
`epic` tinyint(1) NOT NULL DEFAULT 0,
`unrate` tinyint(1) NOT NULL DEFAULT 0,
`verifyCoins` tinyint(1) NOT NULL DEFAULT 0,
`daily` tinyint(1) NOT NULL DEFAULT 0,
`weekly` tinyint(1) NOT NULL DEFAULT 0,
`deleteLevel` tinyint(1) NOT NULL DEFAULT 0,
`renameLevel` tinyint(1) NOT NULL DEFAULT 0,
`changePass` tinyint(1) NOT NULL DEFAULT 0,
`changeDescription` tinyint(1) NOT NULL DEFAULT 0,
`changeSong` tinyint(1) NOT NULL DEFAULT 0,
`deleteComment` tinyint(1) NOT NULL DEFAULT 0,
`makePublic` tinyint(1) NOT NULL DEFAULT 0 COMMENT "Re-list a level",
`makeUnlisted` tinyint(1) NOT NULL DEFAULT 0,
`suggestRating` tinyint(1) NOT NULL DEFAULT 0 COMMENT "Add a Rating to the Suggestion List",
`requestMod` tinyint(1) NOT NULL DEFAULT 0,
`leaderboardBan` tinyint(1) NOT NULL DEFAULT 0,
`createMapPack` tinyint(1) NOT NULL DEFAULT 0,
`createQuest` tinyint(1) NOT NULL DEFAULT 0,
`modPanel` tinyint(1) NOT NULL DEFAULT 0 COMMENT "Access to the Dashboard Mod Panel",
`commentColourR` tinyint(4) UNSIGNED NOT NULL DEFAULT 255 COMMENT "Red Colour 0-255",
`commentColourG` tinyint(4) UNSIGNED NOT NULL DEFAULT 255 COMMENT "Green Colour 0-255",
`commentColourB` tinyint(4) UNSIGNED NOT NULL DEFAULT 255 COMMENT "Blue Colour 0-255",
`modBadge` tinyint(1) NOT NULL DEFAULT 0 COMMENT "0 - None, 1 - Mod, 2 - Elder Mod",
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO `roles` (
`name`,
`rate`,
`feature`,
`epic`,
`unrate`,
`verifyCoins`,
`daily`,
`weekly`,
`deleteLevel`,
`renameLevel`,
`changePass`,
`changeDescription`,
`changeSong`,
`deleteComment`,
`makePublic`,
`makeUnlisted`,
`suggestRating`,
`requestMod`,
`leaderboardBan`,
`createMapPack`,
`createQuest`,
`modPanel`,
`commentColorR`,
`commentColorG`,
`commentColorB`,
`modBadge`
) VALUES
(
'Mod',
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
1,
1,
0,
0,
1,
1,
1,
0,
0,
1,
200,
255,
200,
1
),
(
'Elder Mod',
1,
1,
0,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
0,
0,
1,
75,
255,
75,
2
),
(
'Owner',
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
50,
255,
255,
2
);
/*!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 */;