using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Migrations
{
///
/// Adds the OriginExecutionId correlation column to the central
/// Notifications table (#21). It carries the originating script execution's
/// ExecutionId from the site so the dispatcher can echo it onto the
/// NotifyDeliver audit rows (#23), linking them to the site's NotifySend
/// row for the same run.
///
/// The change is purely additive: OriginExecutionId uniqueidentifier NULL is
/// added with no default, so the operation is a metadata-only ALTER TABLE … ADD.
/// Unlike AuditLog, the Notifications table is NOT partitioned, so a
/// plain ADD is fine. No index is created — the column is never a query
/// predicate, only copied onto audit events. Historical rows stay NULL.
///
public partial class AddNotificationOriginExecutionId : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "OriginExecutionId",
table: "Notifications",
type: "uniqueidentifier",
nullable: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "OriginExecutionId",
table: "Notifications");
}
}
}