feat(labrinth): rework v3 side types to a single environment field (#3701)

* feat(labrinth): rework v3 side types to a single `environment` field

This field is meant to be able to represent the existing v2 side type
information and beyond, in a way that may also be slightly easier to
comprehend.

* chore(labrinth/migrations): use proper val for `HAVING` clause

* feat(labrinth): add `side_types_migration_review_status` field to projects
This commit is contained in:
Alejandro González
2025-06-17 00:44:57 +02:00
committed by GitHub
parent 65126b3a23
commit ef04dcc37b
22 changed files with 358 additions and 205 deletions

View File

@@ -127,7 +127,7 @@ impl LegacyProject {
.collect();
if let Some(versions_item) = versions_item {
// Extract side types from remaining fields (singleplayer, client_only, etc)
// Extract side types from remaining fields
let fields = versions_item
.version_fields
.iter()
@@ -135,10 +135,11 @@ impl LegacyProject {
(f.field_name.clone(), f.value.clone().serialize_internal())
})
.collect::<HashMap<_, _>>();
(client_side, server_side) = v2_reroute::convert_side_types_v2(
&fields,
Some(&*og_project_type),
);
(client_side, server_side) =
v2_reroute::convert_v3_side_types_to_v2_side_types(
&fields,
Some(&*og_project_type),
);
// - if loader is mrpack, this is a modpack
// the loaders are whatever the corresponding loader fields are