chore(host): remove unused Database:MachineDataDb option, validation, config and docs

This commit is contained in:
Joseph Doherty
2026-10-22 06:08:18 -04:00
parent bc1aca0ee6
commit 2da90bf151
20 changed files with 12 additions and 62 deletions
@@ -7,8 +7,6 @@ public class DatabaseOptions
{
/// <summary>Connection string for the central configuration SQL Server database.</summary>
public string? ConfigurationDb { get; set; }
/// <summary>Connection string for the central machine-data SQL Server database.</summary>
public string? MachineDataDb { get; set; }
/// <summary>File system path to the site-local SQLite database directory.</summary>
public string? SiteDbPath { get; set; }
}
@@ -4,7 +4,7 @@ namespace ZB.MOM.WW.ScadaBridge.Host;
/// <summary>
/// Validates <see cref="DatabaseOptions"/> at host startup (arch-review 08
/// round 2 NF4). All three connection settings are nullable and role-dependent
/// round 2 NF4). Both connection settings are nullable and role-dependent
/// (central needs the SQL Server strings, a site needs only the SQLite path),
/// so a <c>null</c> value is valid. A present-but-whitespace value is not — it
/// signals a mis-set config key that would fail opaquely at first DB use.
@@ -15,7 +15,6 @@ public sealed class DatabaseOptionsValidator : OptionsValidatorBase<DatabaseOpti
protected override void Validate(ValidationBuilder builder, DatabaseOptions options)
{
RequireNotWhitespace(builder, options.ConfigurationDb, nameof(DatabaseOptions.ConfigurationDb));
RequireNotWhitespace(builder, options.MachineDataDb, nameof(DatabaseOptions.MachineDataDb));
RequireNotWhitespace(builder, options.SiteDbPath, nameof(DatabaseOptions.SiteDbPath));
}
@@ -73,9 +73,6 @@ public static class StartupValidator
.Require("ScadaBridge:Database:ConfigurationDb",
_ => !string.IsNullOrEmpty(configuration.GetSection("ScadaBridge:Database")["ConfigurationDb"]),
"connection string required for Central")
.Require("ScadaBridge:Database:MachineDataDb",
_ => !string.IsNullOrEmpty(configuration.GetSection("ScadaBridge:Database")["MachineDataDb"]),
"connection string required for Central")
// The LDAP server key moved into the nested Security:Ldap
// sub-section (bound to the shared LdapOptions). Validate the nested key so
// the pre-host preflight still fails fast on a missing LDAP server for