using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ScadaLink.ConfigurationDatabase.Migrations
{
///
/// Adds the OriginParentExecutionId correlation column to the central
/// Notifications table (#21). It carries the originating routed script
/// execution's ParentExecutionId from the site so the dispatcher can echo it
/// onto the NotifyDeliver audit rows (#23), linking them to the routed run's
/// parent. Sibling of OriginExecutionId.
///
/// The change is purely additive: OriginParentExecutionId 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 AddNotificationOriginParentExecutionId : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "OriginParentExecutionId",
table: "Notifications",
type: "uniqueidentifier",
nullable: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "OriginParentExecutionId",
table: "Notifications");
}
}
}