osu: [Big!] rework load_beatmap so that it can retrieve beatmapsets

Also
- scoreboard can handle beatmapsets now
- "when" column is included
- beatmapWithMode's mode field is now optional
This commit is contained in:
Natsu Kagami 2025-02-20 18:07:56 +01:00
parent 08e80fb816
commit 4a2f81c3d3
Signed by: nki
GPG key ID: 55A032EB38B49ADB
13 changed files with 564 additions and 378 deletions

View file

@ -0,0 +1,6 @@
-- Add migration script here
ALTER TABLE osu_last_beatmaps RENAME COLUMN mode TO mode_old;
ALTER TABLE osu_last_beatmaps ADD COLUMN mode INT NULL;
UPDATE osu_last_beatmaps SET mode = mode_old;
ALTER TABLE osu_last_beatmaps DROP COLUMN mode_old;

View file

@ -3,7 +3,7 @@ use crate::models::*;
pub struct LastBeatmap {
pub channel_id: i64,
pub beatmap: Vec<u8>,
pub mode: u8,
pub mode: Option<u8>,
}
impl LastBeatmap {