fix(configuration-database): resolve ConfigurationDatabase-005,006,008,009,010,011 — bounded gRPC columns, split queries, CSV-parse logging, null guards, coverage

This commit is contained in:
Joseph Doherty
2026-05-16 22:14:23 -04:00
parent 25a05af05d
commit 7d1cc5cbb4
17 changed files with 2188 additions and 25 deletions

View File

@@ -0,0 +1,58 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ScadaLink.ConfigurationDatabase.Migrations
{
/// <inheritdoc />
public partial class BoundGrpcNodeAddressLength : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "GrpcNodeBAddress",
table: "Sites",
type: "nvarchar(500)",
maxLength: 500,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "GrpcNodeAAddress",
table: "Sites",
type: "nvarchar(500)",
maxLength: 500,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "GrpcNodeBAddress",
table: "Sites",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(500)",
oldMaxLength: 500,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "GrpcNodeAAddress",
table: "Sites",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(500)",
oldMaxLength: 500,
oldNullable: true);
}
}
}

View File

@@ -830,10 +830,12 @@ namespace ScadaLink.ConfigurationDatabase.Migrations
.HasColumnType("nvarchar(2000)");
b.Property<string>("GrpcNodeAAddress")
.HasColumnType("nvarchar(max)");
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("GrpcNodeBAddress")
.HasColumnType("nvarchar(max)");
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("Name")
.IsRequired()