123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace Edge.Core.Database.Migrations
- {
- public partial class AddGenericAlarms : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "GenericAlarms",
- columns: table => new
- {
- Id = table.Column<int>(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- ProcessorEndpointFullTypeStr = table.Column<string>(type: "TEXT", nullable: true),
- OriginatorDisplayName = table.Column<string>(type: "TEXT", nullable: true),
- Title = table.Column<string>(type: "TEXT", nullable: true),
- Detail = table.Column<string>(type: "TEXT", nullable: true),
- Category = table.Column<string>(type: "TEXT", nullable: true),
- SubCategory = table.Column<string>(type: "TEXT", nullable: true),
- HiddenData = table.Column<string>(type: "TEXT", nullable: true),
- Action = table.Column<string>(type: "TEXT", nullable: true),
- Severity = table.Column<int>(type: "INTEGER", nullable: false),
- OpeningTimestamp = table.Column<DateTime>(type: "TEXT", nullable: false),
- AckedReason = table.Column<string>(type: "TEXT", nullable: true),
- AckedTimestamp = table.Column<DateTime>(type: "TEXT", nullable: true),
- ClosedReason = table.Column<string>(type: "TEXT", nullable: true),
- ClosedTimestamp = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_GenericAlarms", x => x.Id);
- });
- migrationBuilder.CreateIndex(
- name: "IX_GenericAlarms_Category_SubCategory",
- table: "GenericAlarms",
- columns: new[] { "Category", "SubCategory" });
- migrationBuilder.CreateIndex(
- name: "IX_GenericAlarms_ClosedTimestamp",
- table: "GenericAlarms",
- column: "ClosedTimestamp");
- migrationBuilder.CreateIndex(
- name: "IX_GenericAlarms_HiddenData",
- table: "GenericAlarms",
- column: "HiddenData");
- migrationBuilder.CreateIndex(
- name: "IX_GenericAlarms_OpeningTimestamp",
- table: "GenericAlarms",
- column: "OpeningTimestamp");
- migrationBuilder.CreateIndex(
- name: "IX_GenericAlarms_OriginatorDisplayName_OpeningTimestamp_ClosedTimestamp",
- table: "GenericAlarms",
- columns: new[] { "OriginatorDisplayName", "OpeningTimestamp", "ClosedTimestamp" });
- migrationBuilder.CreateIndex(
- name: "IX_GenericAlarms_ProcessorEndpointFullTypeStr",
- table: "GenericAlarms",
- column: "ProcessorEndpointFullTypeStr");
- migrationBuilder.CreateIndex(
- name: "IX_GenericAlarms_Severity",
- table: "GenericAlarms",
- column: "Severity");
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "GenericAlarms");
- }
- }
- }
|