using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace ScadaLink.ConfigurationDatabase.Migrations { /// /// Adds the SourceNode column to the central SiteCalls table (#22, /// SourceNode-stamping). SourceNode identifies the cluster node that produced the /// row (e.g. node-a, central-a) — ASCII-only, so varchar(64) not /// nvarchar. NULL is valid for rows that pre-date this feature and for /// reconciled rows from a retired node. /// /// The change is purely additive: SourceNode varchar(64) NULL is added with no /// default, so the operation is a metadata-only ALTER TABLE … ADD. The /// SiteCalls table is NOT partitioned (operational state, not audit), so a plain /// ADD is fine. No index — Site Call Audit KPIs are per-site, not per-node, on /// this table; SourceNode is operational metadata, never a query predicate here. /// Historical rows stay NULL. /// public partial class AddSiteCallSourceNode : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "SourceNode", table: "SiteCalls", type: "varchar(64)", maxLength: 64, nullable: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "SourceNode", table: "SiteCalls"); } } }