From 97930d7cd46517dc76c32daa63cca90954b09b48 Mon Sep 17 00:00:00 2001 From: Holly Date: Fri, 26 Aug 2022 13:01:07 +0100 Subject: [PATCH] new sql shit this was pain --- osu!.sql | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/osu!.sql b/osu!.sql index 1d3200b..54891c6 100755 --- a/osu!.sql +++ b/osu!.sql @@ -31,11 +31,49 @@ CREATE TABLE `scores` ( `pp` float NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE `mp_matches` ( + `id` int(10) UNSIGNED NOT NULL, + `name` varchar(127) NOT NULL, + `open_time` varchar(18) NOT NULL, + `close_time` varchar(18) DEFAULT NULL, + `seed` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE `mp_match_rounds` ( + `id` int(11) NOT NULL, + `match_id` int(11) NOT NULL, + `round_id` int(11) NOT NULL, + `round_mode` tinyint(4) NOT NULL, + `match_type` tinyint(4) NOT NULL, + `round_scoring_type` tinyint(4) NOT NULL, + `round_team_type` tinyint(4) NOT NULL, + `round_mods` int(11) NOT NULL, + `beatmap_md5` varchar(127) NOT NULL, + `freemod` tinyint(1) NOT NULL DEFAULT 0, + `player0` tinytext DEFAULT NULL, + `player1` tinytext DEFAULT NULL, + `player2` tinytext DEFAULT NULL, + `player3` tinytext DEFAULT NULL, + `player4` tinytext DEFAULT NULL, + `player5` tinytext DEFAULT NULL, + `player6` tinytext DEFAULT NULL, + `player7` tinytext DEFAULT NULL, + `player8` tinytext DEFAULT NULL, + `player9` tinytext DEFAULT NULL, + `player10` tinytext DEFAULT NULL, + `player11` tinytext DEFAULT NULL, + `player12` tinytext DEFAULT NULL, + `player13` tinytext DEFAULT NULL, + `player14` tinytext DEFAULT NULL, + `player15` tinytext DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + CREATE TABLE `users_info` ( `id` int(11) NOT NULL, `username` varchar(15) NOT NULL, `username_safe` varchar(15) NOT NULL, - `password` text NOT NULL, + `password_hash` text NOT NULL, + `password_salt` text NOT NULL, `email` text NOT NULL, `country` varchar(2) NOT NULL, `reg_date` datetime NOT NULL, @@ -47,7 +85,8 @@ CREATE TABLE `users_info` ( `web_session` varchar(64) NOT NULL, `verification_needed` tinyint(1) NOT NULL DEFAULT '0', `password_change_required` tinyint(1) NOT NULL, - `has_old_password` tinyint(1) NOT NULL DEFAULT '0', + `has_old_password` int(11) NOT NULL DEFAULT 0, + `password_reset_key` text DEFAULT NULL, `away_message` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -113,6 +152,17 @@ ALTER TABLE `web_prefs` ALTER TABLE `web_titles` ADD PRIMARY KEY (`id`); +ALTER TABLE `mp_matches` + ADD PRIMARY KEY (`id`); + +ALTER TABLE `mp_match_rounds` + ADD PRIMARY KEY (`id`); + +ALTER TABLE `mp_matches` + MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; + +ALTER TABLE `mp_match_rounds` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; ALTER TABLE `scores` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;