forked from Coffeelot/cw-racingapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cw-racingapp.sql
41 lines (39 loc) · 1.56 KB
/
cw-racingapp.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
-- ADD RACE TRACK TABLE (MAKE SURE TO DELETE race_tracks FIRST IF YOU ALREADY HAVE IT!!!!)
-- DROP TABLE IF EXISTS race_tracks;
CREATE TABLE `race_tracks` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
`checkpoints` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
`records` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
`creatorid` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
`creatorname` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
`distance` INT(11) NULL DEFAULT NULL,
`raceid` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
`access` TEXT NULL DEFAULT '{}' COLLATE 'utf8_general_ci',
`curated` TINYINT(4) NULL DEFAULT '0',
PRIMARY KEY (`id`) USING BTREE,
INDEX `raceid` (`raceid`) USING BTREE
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=0
;
-- DROP TABLE IF EXISTS racer_names;
CREATE TABLE `racer_names` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` TEXT NOT NULL COLLATE 'utf8mb4_general_ci',
`racername` TEXT NOT NULL COLLATE 'utf8mb4_general_ci',
`lasttouched` TIMESTAMP NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`races` INT(11) NOT NULL DEFAULT '0',
`wins` INT(11) NOT NULL DEFAULT '0',
`tracks` INT(11) NOT NULL DEFAULT '0',
`auth` TEXT NULL DEFAULT 'racer' COLLATE 'utf8mb4_general_ci',
`createdby` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
`revoked` TINYINT(4) NULL DEFAULT '0',
`ranking` INT(11) NULL DEFAULT '0',
INDEX `id` (`id`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=44
;