Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions migrations/20260921194331_add_gd_2209.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Add up migration script here
--
alter type gd_version add value '2.209';
19 changes: 12 additions & 7 deletions src/types/models/mod_gd_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,16 @@ pub enum GDVersionEnum {
#[serde(rename = "2.2082")]
#[sqlx(rename = "2.2082")]
GD22082,
#[serde(rename = "2.209")]
#[sqlx(rename = "2.209")]
GD2209,
}

impl GDVersionEnum {
/// GD versions that are currently actively supported
#[allow(unused)]
pub fn latest_supported() -> &'static [GDVersionEnum] {
&[
GDVersionEnum::All,
GDVersionEnum::GD22081,
GDVersionEnum::GD22082,
]
&[GDVersionEnum::All, GDVersionEnum::GD2209]
}

/// GD versions for which we apply auto-migration to S3 storage
Expand All @@ -72,6 +71,7 @@ impl GDVersionEnum {
GDVersionEnum::GD2206,
GDVersionEnum::GD22074,
GDVersionEnum::GD22081,
GDVersionEnum::GD2209,
]
}
}
Expand All @@ -94,6 +94,7 @@ impl FromStr for GDVersionEnum {
"2.208" => Ok(GDVersionEnum::GD2208),
"2.2081" => Ok(GDVersionEnum::GD22081),
"2.2082" => Ok(GDVersionEnum::GD22082),
"2.209" => Ok(GDVersionEnum::GD2209),
_ => Err(()),
}
}
Expand Down Expand Up @@ -221,7 +222,9 @@ impl DetailedGDVersion {
})
}
}
if let Some(win) = self.win && json.windows {
if let Some(win) = self.win
&& json.windows
{
ret.push(ModGDVersionCreate {
gd: win,
platform: VerPlatform::Win,
Expand All @@ -241,7 +244,9 @@ impl DetailedGDVersion {
})
}
}
if let Some(ios) = self.ios && json.ios {
if let Some(ios) = self.ios
&& json.ios
{
ret.push(ModGDVersionCreate {
gd: ios,
platform: VerPlatform::Ios,
Expand Down
Loading