Skip to content

Commit c543716

Browse files
committed
feat: changed migrations with new osu_status_date
1 parent 6cdd342 commit c543716

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/models/beatmaps/beatmapset/query/by_id.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub async fn find_by_id(pool: &PgPool, id: i32) -> Result<Option<BeatmapsetRow>,
55
sqlx::query_as!(
66
BeatmapsetRow,
77
r#"
8-
SELECT id, osu_id, artist, artist_unicode, title, title_unicode, creator, source, tags, has_video, has_storyboard, is_explicit, is_featured, cover_url, preview_url, osu_file_url, created_at, updated_at
8+
SELECT id, osu_id, artist, artist_unicode, title, title_unicode, creator, source, tags, has_video, has_storyboard, is_explicit, is_featured, cover_url, preview_url, osu_file_url, created_at, updated_at, osu_status_changed_at
99
FROM beatmapset
1010
WHERE id = $1
1111
"#,
@@ -22,7 +22,7 @@ pub async fn find_by_osu_id(
2222
sqlx::query_as!(
2323
BeatmapsetRow,
2424
r#"
25-
SELECT id, osu_id, artist, artist_unicode, title, title_unicode, creator, source, tags, has_video, has_storyboard, is_explicit, is_featured, cover_url, preview_url, osu_file_url, created_at, updated_at
25+
SELECT id, osu_id, artist, artist_unicode, title, title_unicode, creator, source, tags, has_video, has_storyboard, is_explicit, is_featured, cover_url, preview_url, osu_file_url, created_at, updated_at, osu_status_changed_at
2626
FROM beatmapset
2727
WHERE osu_id = $1
2828
"#,

src/models/beatmaps/beatmapset/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,7 @@ pub struct BeatmapsetRow {
8585

8686
/// Timestamp when the beatmapset was last updated.
8787
pub updated_at: Option<NaiveDateTime>,
88+
89+
/// Timestamp when the beatmapset status was last changed.
90+
pub osu_status_changed_at: Option<NaiveDateTime>,
8891
}

src/models/beatmaps/pending_beatmap/types.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,3 @@ pub struct PendingBeatmapRow {
3030
/// Timestamp when the pending beatmap was created.
3131
pub created_at: Option<NaiveDateTime>,
3232
}
33-
34-
#[derive(Debug, Clone)]
35-
pub struct PendingBeatmapNew {
36-
pub osu_hash: String,
37-
pub osu_id: Option<i32>,
38-
}

0 commit comments

Comments
 (0)