< Summary

Information
Class: ProjectTemplate.Infrastructure.Data.Migrations.AddApplicationAuditReconciliation
Assembly: ProjectTemplate.Infrastructure
File(s): /home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Infrastructure/Data/Migrations/20260719170000_AddApplicationAuditReconciliation.cs
Line coverage
100%
Covered lines: 58
Uncovered lines: 0
Coverable lines: 58
Total lines: 84
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Up(...)100%11100%
Down(...)100%11100%

File(s)

/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Infrastructure/Data/Migrations/20260719170000_AddApplicationAuditReconciliation.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Infrastructure;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3
 4#nullable disable
 5
 6namespace ProjectTemplate.Infrastructure.Data.Migrations;
 7
 8/// <inheritdoc />
 9[DbContext(typeof(ApplicationDbContext))]
 10[Migration("20260719170000_AddApplicationAuditReconciliation")]
 11public partial class AddApplicationAuditReconciliation : Migration
 12{
 13    /// <inheritdoc />
 14    protected override void Up(MigrationBuilder migrationBuilder)
 15    {
 116        migrationBuilder.CreateTable(
 117            name: "ApplicationAuditReconciliationFindings",
 118            columns: table => new
 119            {
 120                Id = table.Column<Guid>(type: "TEXT", nullable: false),
 121                SchemaVersion = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false),
 122                FindingKey = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
 123                ReasonCode = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 124                Severity = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false),
 125                MutationBatchId = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 126                Destination = table.Column<string>(type: "TEXT", maxLength: 128, nullable: true),
 127                Guidance = table.Column<string>(type: "TEXT", maxLength: 512, nullable: false),
 128                RemediationStatus = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false),
 129                FirstObservedUtc = table.Column<DateTime>(type: "TEXT", precision: 3, nullable: false),
 130                LastObservedUtc = table.Column<DateTime>(type: "TEXT", precision: 3, nullable: false),
 131                ResolvedUtc = table.Column<DateTime>(type: "TEXT", precision: 3, nullable: true),
 132                ConcurrencyStamp = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false)
 133            },
 134            constraints: table => table.PrimaryKey("PK_ApplicationAuditReconciliationFindings", x => x.Id));
 35
 136        migrationBuilder.CreateTable(
 137            name: "ApplicationAuditReconciliationRemediations",
 138            columns: table => new
 139            {
 140                Id = table.Column<Guid>(type: "TEXT", nullable: false),
 141                FindingId = table.Column<Guid>(type: "TEXT", nullable: false),
 142                MutationBatchId = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 143                ActionCode = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 144                ActorId = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false),
 145                EvidenceReference = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
 146                RecordedUtc = table.Column<DateTime>(type: "TEXT", precision: 3, nullable: false),
 147                ConcurrencyStamp = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false)
 148            },
 149            constraints: table => table.PrimaryKey("PK_ApplicationAuditReconciliationRemediations", x => x.Id));
 50
 151        migrationBuilder.CreateIndex(
 152            name: "IX_ApplicationAuditReconciliationFindings_FindingKey",
 153            table: "ApplicationAuditReconciliationFindings",
 154            column: "FindingKey",
 155            unique: true);
 56
 157        migrationBuilder.CreateIndex(
 158            name: "IX_ApplicationAuditReconciliationFindings_MutationBatchId_ReasonCode",
 159            table: "ApplicationAuditReconciliationFindings",
 160            columns: ["MutationBatchId", "ReasonCode"]);
 61
 162        migrationBuilder.CreateIndex(
 163            name: "IX_ApplicationAuditReconciliationFindings_RemediationStatus_Severity",
 164            table: "ApplicationAuditReconciliationFindings",
 165            columns: ["RemediationStatus", "Severity"]);
 66
 167        migrationBuilder.CreateIndex(
 168            name: "IX_ApplicationAuditReconciliationRemediations_FindingId",
 169            table: "ApplicationAuditReconciliationRemediations",
 170            column: "FindingId");
 71
 172        migrationBuilder.CreateIndex(
 173            name: "IX_ApplicationAuditReconciliationRemediations_MutationBatchId",
 174            table: "ApplicationAuditReconciliationRemediations",
 175            column: "MutationBatchId");
 176    }
 77
 78    /// <inheritdoc />
 79    protected override void Down(MigrationBuilder migrationBuilder)
 80    {
 181        migrationBuilder.DropTable(name: "ApplicationAuditReconciliationRemediations");
 182        migrationBuilder.DropTable(name: "ApplicationAuditReconciliationFindings");
 183    }
 84}