305b42ea6d
Adds IsInherited/LockedInDerived to the TemplateAlarm entity (mirroring the attribute/script override model), an EF migration, base-alarm copy-on-derive, inherited-alarm flattening skip, and LockedInDerived override-rejection validation.
41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace ScadaLink.ConfigurationDatabase.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddDerivedAlarmFields : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsInherited",
|
|
table: "TemplateAlarms",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "LockedInDerived",
|
|
table: "TemplateAlarms",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "IsInherited",
|
|
table: "TemplateAlarms");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LockedInDerived",
|
|
table: "TemplateAlarms");
|
|
}
|
|
}
|
|
}
|