From aa6c64a09145ff7ed737f1703ec3ba700794c8b1 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sat, 13 Jul 2024 19:22:14 +0200 Subject: [PATCH] Make EngineVersion nullable FUCK ignore that previous commit, I forgot to push this before merging the PR. --- Robust.Cdn/Controllers/ForkBuildPageController.cs | 4 ++-- Robust.Cdn/ManifestMigrations/Script0001_Init.sql | 3 ++- Robust.Cdn/Views/ForkBuildPage/Index.cshtml | 7 +++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Robust.Cdn/Controllers/ForkBuildPageController.cs b/Robust.Cdn/Controllers/ForkBuildPageController.cs index 9cbb65d..0b3b030 100644 --- a/Robust.Cdn/Controllers/ForkBuildPageController.cs +++ b/Robust.Cdn/Controllers/ForkBuildPageController.cs @@ -78,7 +78,7 @@ public sealed class Version { public required string Name; public required DateTime PublishedTime; - public required string EngineVersion; + public required string? EngineVersion; public required VersionServer[] Servers; } @@ -94,6 +94,6 @@ private sealed class DbVersion public required int Id { get; set; } public required string Name { get; set; } public required DateTime PublishedTime { get; set; } - public required string EngineVersion { get; set; } + public required string? EngineVersion { get; set; } } } diff --git a/Robust.Cdn/ManifestMigrations/Script0001_Init.sql b/Robust.Cdn/ManifestMigrations/Script0001_Init.sql index 3c0da88..033939a 100644 --- a/Robust.Cdn/ManifestMigrations/Script0001_Init.sql +++ b/Robust.Cdn/ManifestMigrations/Script0001_Init.sql @@ -28,7 +28,8 @@ CREATE TABLE ForkVersion( ClientSha256 BLOB NOT NULL, -- Not strictly necessary, but I'll save it here anyways. - EngineVersion TEXT NOT NULL, + -- NULL for old imported builds before this value was tracked. + EngineVersion TEXT NULL, -- Whether this version is available for servers to download. -- This is updated after CDN content ingestion finishes. diff --git a/Robust.Cdn/Views/ForkBuildPage/Index.cshtml b/Robust.Cdn/Views/ForkBuildPage/Index.cshtml index d3f59b3..feaa87e 100644 --- a/Robust.Cdn/Views/ForkBuildPage/Index.cshtml +++ b/Robust.Cdn/Views/ForkBuildPage/Index.cshtml @@ -33,8 +33,11 @@
@version.Name
Date:
-
Engine Version:
-
@version.EngineVersion
+ @if (version.EngineVersion is { } engineVersion) + { +
Engine Version:
+
@engineVersion
+ }

Download