9e97c1acd2
Central now resolves site Akka remoting addresses from the Sites DB table (NodeAAddress/NodeBAddress) instead of relying on runtime RegisterSite messages. Eliminates the race condition where sites starting before central had their registration dead-lettered. Addresses are cached in CentralCommunicationActor with 60s periodic refresh and on-demand refresh when sites are added/edited/deleted via UI or CLI.
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
|
|
namespace ScadaLink.ConfigurationDatabase.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddSiteNodeAddresses : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NodeAAddress",
|
|
table: "Sites",
|
|
type: "nvarchar(500)",
|
|
maxLength: 500,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NodeBAddress",
|
|
table: "Sites",
|
|
type: "nvarchar(500)",
|
|
maxLength: 500,
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "NodeAAddress",
|
|
table: "Sites");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NodeBAddress",
|
|
table: "Sites");
|
|
}
|
|
}
|
|
}
|