< 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    {
 216        migrationBuilder.CreateTable(
 217            name: "ApplicationAuditReconciliationFindings",
 218            columns: table => new
 219            {
 220                Id = table.Column<Guid>(type: "TEXT", nullable: false),
 221                SchemaVersion = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false),
 222                FindingKey = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
 223                ReasonCode = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 224                Severity = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false),
 225                MutationBatchId = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 226                Destination = table.Column<string>(type: "TEXT", maxLength: 128, nullable: true),
 227                Guidance = table.Column<string>(type: "TEXT", maxLength: 512, nullable: false),
 228                RemediationStatus = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false),
 229                FirstObservedUtc = table.Column<DateTime>(type: "TEXT", precision: 3, nullable: false),
 230                LastObservedUtc = table.Column<DateTime>(type: "TEXT", precision: 3, nullable: false),
 231                ResolvedUtc = table.Column<DateTime>(type: "TEXT", precision: 3, nullable: true),
 232                ConcurrencyStamp = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false)
 233            },
 434            constraints: table => table.PrimaryKey("PK_ApplicationAuditReconciliationFindings", x => x.Id));
 35
 236        migrationBuilder.CreateTable(
 237            name: "ApplicationAuditReconciliationRemediations",
 238            columns: table => new
 239            {
 240                Id = table.Column<Guid>(type: "TEXT", nullable: false),
 241                FindingId = table.Column<Guid>(type: "TEXT", nullable: false),
 242                MutationBatchId = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 243                ActionCode = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 244                ActorId = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false),
 245                EvidenceReference = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
 246                RecordedUtc = table.Column<DateTime>(type: "TEXT", precision: 3, nullable: false),
 247                ConcurrencyStamp = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false)
 248            },
 449            constraints: table => table.PrimaryKey("PK_ApplicationAuditReconciliationRemediations", x => x.Id));
 50
 251        migrationBuilder.CreateIndex(
 252            name: "IX_ApplicationAuditReconciliationFindings_FindingKey",
 253            table: "ApplicationAuditReconciliationFindings",
 254            column: "FindingKey",
 255            unique: true);
 56
 257        migrationBuilder.CreateIndex(
 258            name: "IX_ApplicationAuditReconciliationFindings_MutationBatchId_ReasonCode",
 259            table: "ApplicationAuditReconciliationFindings",
 260            columns: ["MutationBatchId", "ReasonCode"]);
 61
 262        migrationBuilder.CreateIndex(
 263            name: "IX_ApplicationAuditReconciliationFindings_RemediationStatus_Severity",
 264            table: "ApplicationAuditReconciliationFindings",
 265            columns: ["RemediationStatus", "Severity"]);
 66
 267        migrationBuilder.CreateIndex(
 268            name: "IX_ApplicationAuditReconciliationRemediations_FindingId",
 269            table: "ApplicationAuditReconciliationRemediations",
 270            column: "FindingId");
 71
 272        migrationBuilder.CreateIndex(
 273            name: "IX_ApplicationAuditReconciliationRemediations_MutationBatchId",
 274            table: "ApplicationAuditReconciliationRemediations",
 275            column: "MutationBatchId");
 276    }
 77
 78    /// <inheritdoc />
 79    protected override void Down(MigrationBuilder migrationBuilder)
 80    {
 281        migrationBuilder.DropTable(name: "ApplicationAuditReconciliationRemediations");
 282        migrationBuilder.DropTable(name: "ApplicationAuditReconciliationFindings");
 283    }
 84}