Add Rec Center doors management: implement endpoints for retrieving and updating door configurations; enhance database schema and UI integration

This commit is contained in:
Alexa
2026-06-02 17:08:42 +03:00
parent 218d92f856
commit 810ba0992c
8 changed files with 428 additions and 34 deletions
@@ -244,6 +244,8 @@ public static class DatabaseBootstrap
{
await db.Database.ExecuteSqlRawAsync(
@"ALTER TABLE ""ServerSettings"" ADD COLUMN IF NOT EXISTS ""PlayMenuTagsJson"" text NOT NULL DEFAULT '';");
await db.Database.ExecuteSqlRawAsync(
@"ALTER TABLE ""ServerSettings"" ADD COLUMN IF NOT EXISTS ""RecCenterDoorsJson"" text NOT NULL DEFAULT '';");
return;
}
@@ -258,6 +260,18 @@ public static class DatabaseBootstrap
// ignore the duplicate-column error; any other schema problem
// will surface when EF reads ServerSettings.
}
try
{
await db.Database.ExecuteSqlRawAsync(
@"ALTER TABLE ""ServerSettings"" ADD COLUMN ""RecCenterDoorsJson"" TEXT NOT NULL DEFAULT '';");
}
catch
{
// SQLite has no ADD COLUMN IF NOT EXISTS. If it already exists,
// ignore the duplicate-column error; any other schema problem
// will surface when EF reads ServerSettings.
}
}
/// <summary>SQLite migration-history reconciliation. Handles two