< Summary

Line coverage
100%
Covered lines: 290
Uncovered lines: 0
Coverable lines: 290
Total lines: 351
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
File 1: Up(...)100%11100%
File 1: Down(...)100%11100%
File 2: BuildTargetModel(...)100%11100%

File(s)

/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Infrastructure/Data/Migrations/20260717183000_AddAuditAccountabilityContext.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace ProjectTemplate.Infrastructure.Data.Migrations;
 6
 7/// <inheritdoc />
 8public partial class AddAuditAccountabilityContext : Migration
 9{
 10    /// <inheritdoc />
 11    protected override void Up(MigrationBuilder migrationBuilder)
 12    {
 213        migrationBuilder.AddColumn<string>(
 214            name: "ActorId",
 215            table: "AuditRecords",
 216            type: "TEXT",
 217            maxLength: 256,
 218            nullable: false,
 219            defaultValue: "Unknown");
 20
 221        migrationBuilder.AddColumn<string>(
 222            name: "ActorType",
 223            table: "AuditRecords",
 224            type: "TEXT",
 225            maxLength: 64,
 226            nullable: false,
 227            defaultValue: "Unknown");
 28
 229        migrationBuilder.AddColumn<string>(
 230            name: "CorrelationId",
 231            table: "AuditRecords",
 232            type: "TEXT",
 233            maxLength: 128,
 234            nullable: true);
 35
 236        migrationBuilder.AddColumn<string>(
 237            name: "DecisionAuditRecordId",
 238            table: "AuditRecords",
 239            type: "TEXT",
 240            maxLength: 128,
 241            nullable: true);
 42
 243        migrationBuilder.AddColumn<string>(
 244            name: "ExecutionAttemptId",
 245            table: "AuditRecords",
 246            type: "TEXT",
 247            maxLength: 128,
 248            nullable: true);
 49
 250        migrationBuilder.AddColumn<string>(
 251            name: "MutationBatchId",
 252            table: "AuditRecords",
 253            type: "TEXT",
 254            maxLength: 64,
 255            nullable: false,
 256            defaultValue: "legacy");
 57
 258        migrationBuilder.AddColumn<string>(
 259            name: "OperationExecutionId",
 260            table: "AuditRecords",
 261            type: "TEXT",
 262            maxLength: 128,
 263            nullable: true);
 64
 265        migrationBuilder.AddColumn<string>(
 266            name: "OrganizationHash",
 267            table: "AuditRecords",
 268            type: "TEXT",
 269            maxLength: 128,
 270            nullable: true);
 71
 272        migrationBuilder.AddColumn<string>(
 273            name: "SchemaVersion",
 274            table: "AuditRecords",
 275            type: "TEXT",
 276            maxLength: 32,
 277            nullable: false,
 278            defaultValue: "1.0");
 79
 280        migrationBuilder.AddColumn<string>(
 281            name: "SpanId",
 282            table: "AuditRecords",
 283            type: "TEXT",
 284            maxLength: 32,
 285            nullable: true);
 86
 287        migrationBuilder.AddColumn<string>(
 288            name: "TenantHash",
 289            table: "AuditRecords",
 290            type: "TEXT",
 291            maxLength: 128,
 292            nullable: true);
 93
 294        migrationBuilder.AddColumn<string>(
 295            name: "TraceId",
 296            table: "AuditRecords",
 297            type: "TEXT",
 298            maxLength: 64,
 299            nullable: true);
 100
 2101        migrationBuilder.CreateIndex(
 2102            name: "IX_AuditRecords_CorrelationId",
 2103            table: "AuditRecords",
 2104            column: "CorrelationId");
 105
 2106        migrationBuilder.CreateIndex(
 2107            name: "IX_AuditRecords_DecisionAuditRecordId",
 2108            table: "AuditRecords",
 2109            column: "DecisionAuditRecordId");
 110
 2111        migrationBuilder.CreateIndex(
 2112            name: "IX_AuditRecords_MutationBatchId",
 2113            table: "AuditRecords",
 2114            column: "MutationBatchId");
 115
 2116        migrationBuilder.CreateIndex(
 2117            name: "IX_AuditRecords_OperationExecutionId",
 2118            table: "AuditRecords",
 2119            column: "OperationExecutionId");
 2120    }
 121
 122    /// <inheritdoc />
 123    protected override void Down(MigrationBuilder migrationBuilder)
 124    {
 2125        migrationBuilder.DropIndex(
 2126            name: "IX_AuditRecords_CorrelationId",
 2127            table: "AuditRecords");
 128
 2129        migrationBuilder.DropIndex(
 2130            name: "IX_AuditRecords_DecisionAuditRecordId",
 2131            table: "AuditRecords");
 132
 2133        migrationBuilder.DropIndex(
 2134            name: "IX_AuditRecords_MutationBatchId",
 2135            table: "AuditRecords");
 136
 2137        migrationBuilder.DropIndex(
 2138            name: "IX_AuditRecords_OperationExecutionId",
 2139            table: "AuditRecords");
 140
 2141        migrationBuilder.DropColumn(name: "ActorId", table: "AuditRecords");
 2142        migrationBuilder.DropColumn(name: "ActorType", table: "AuditRecords");
 2143        migrationBuilder.DropColumn(name: "CorrelationId", table: "AuditRecords");
 2144        migrationBuilder.DropColumn(name: "DecisionAuditRecordId", table: "AuditRecords");
 2145        migrationBuilder.DropColumn(name: "ExecutionAttemptId", table: "AuditRecords");
 2146        migrationBuilder.DropColumn(name: "MutationBatchId", table: "AuditRecords");
 2147        migrationBuilder.DropColumn(name: "OperationExecutionId", table: "AuditRecords");
 2148        migrationBuilder.DropColumn(name: "OrganizationHash", table: "AuditRecords");
 2149        migrationBuilder.DropColumn(name: "SchemaVersion", table: "AuditRecords");
 2150        migrationBuilder.DropColumn(name: "SpanId", table: "AuditRecords");
 2151        migrationBuilder.DropColumn(name: "TenantHash", table: "AuditRecords");
 2152        migrationBuilder.DropColumn(name: "TraceId", table: "AuditRecords");
 2153    }
 154}

/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Infrastructure/Data/Migrations/20260717183000_AddAuditAccountabilityContext.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Microsoft.EntityFrameworkCore;
 4using Microsoft.EntityFrameworkCore.Infrastructure;
 5using Microsoft.EntityFrameworkCore.Migrations;
 6using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 7using ProjectTemplate.Infrastructure.Data;
 8
 9#nullable disable
 10
 11namespace ProjectTemplate.Infrastructure.Data.Migrations
 12{
 13    [DbContext(typeof(ApplicationDbContext))]
 14    [Migration("20260717183000_AddAuditAccountabilityContext")]
 15    partial class AddAuditAccountabilityContext
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 421            modelBuilder.HasAnnotation("ProductVersion", "10.0.8");
 22
 423            modelBuilder.Entity("ProjectTemplate.Infrastructure.Data.Entities.AuditRecord", b =>
 424                {
 425                    b.Property<Guid>("Id")
 426                        .HasColumnType("TEXT");
 427
 428                    b.Property<string>("ActorId")
 429                        .IsRequired()
 430                        .HasMaxLength(256)
 431                        .HasColumnType("TEXT");
 432
 433                    b.Property<string>("ActorType")
 434                        .IsRequired()
 435                        .HasMaxLength(64)
 436                        .HasColumnType("TEXT");
 437
 438                    b.Property<string>("Application")
 439                        .IsRequired()
 440                        .HasMaxLength(200)
 441                        .HasColumnType("TEXT");
 442
 443                    b.Property<string>("ConcurrencyStamp")
 444                        .IsConcurrencyToken()
 445                        .IsRequired()
 446                        .HasMaxLength(64)
 447                        .HasColumnType("TEXT");
 448
 449                    b.Property<string>("CorrelationId")
 450                        .HasMaxLength(128)
 451                        .HasColumnType("TEXT");
 452
 453                    b.Property<string>("CurrentValues")
 454                        .IsRequired()
 455                        .HasColumnType("TEXT");
 456
 457                    b.Property<string>("DecisionAuditRecordId")
 458                        .HasMaxLength(128)
 459                        .HasColumnType("TEXT");
 460
 461                    b.Property<string>("Entity")
 462                        .IsRequired()
 463                        .HasMaxLength(200)
 464                        .HasColumnType("TEXT");
 465
 466                    b.Property<string>("ExecutionAttemptId")
 467                        .HasMaxLength(128)
 468                        .HasColumnType("TEXT");
 469
 470                    b.Property<string>("KeyValues")
 471                        .IsRequired()
 472                        .HasColumnType("TEXT");
 473
 474                    b.Property<string>("ModifiedBy")
 475                        .IsRequired()
 476                        .HasMaxLength(200)
 477                        .HasColumnType("TEXT");
 478
 479                    b.Property<DateTime>("ModifiedOnUtc")
 480                        .HasPrecision(3)
 481                        .HasColumnType("TEXT");
 482
 483                    b.Property<string>("MutationBatchId")
 484                        .IsRequired()
 485                        .HasMaxLength(64)
 486                        .HasColumnType("TEXT");
 487
 488                    b.Property<string>("OperationExecutionId")
 489                        .HasMaxLength(128)
 490                        .HasColumnType("TEXT");
 491
 492                    b.Property<string>("OrganizationHash")
 493                        .HasMaxLength(128)
 494                        .HasColumnType("TEXT");
 495
 496                    b.Property<string>("OriginalValues")
 497                        .IsRequired()
 498                        .HasColumnType("TEXT");
 499
 4100                    b.Property<string>("SchemaVersion")
 4101                        .IsRequired()
 4102                        .HasMaxLength(32)
 4103                        .HasColumnType("TEXT");
 4104
 4105                    b.Property<string>("SpanId")
 4106                        .HasMaxLength(32)
 4107                        .HasColumnType("TEXT");
 4108
 4109                    b.Property<string>("State")
 4110                        .IsRequired()
 4111                        .HasMaxLength(100)
 4112                        .HasColumnType("TEXT");
 4113
 4114                    b.Property<string>("TenantHash")
 4115                        .HasMaxLength(128)
 4116                        .HasColumnType("TEXT");
 4117
 4118                    b.Property<string>("TraceId")
 4119                        .HasMaxLength(64)
 4120                        .HasColumnType("TEXT");
 4121
 4122                    b.HasKey("Id");
 4123
 4124                    b.HasIndex("CorrelationId");
 4125                    b.HasIndex("DecisionAuditRecordId");
 4126                    b.HasIndex("MutationBatchId");
 4127                    b.HasIndex("OperationExecutionId");
 4128
 4129                    b.ToTable("AuditRecords", (string)null);
 8130                });
 131
 4132            modelBuilder.Entity("ProjectTemplate.Infrastructure.Data.Entities.ExternalLoginAccount", b =>
 4133                {
 4134                    b.Property<Guid>("Id")
 4135                        .HasColumnType("TEXT");
 4136
 4137                    b.Property<string>("ConcurrencyStamp")
 4138                        .IsConcurrencyToken()
 4139                        .IsRequired()
 4140                        .HasMaxLength(64)
 4141                        .HasColumnType("TEXT");
 4142
 4143                    b.Property<DateTime>("CreatedOnUtc")
 4144                        .HasPrecision(3)
 4145                        .HasColumnType("TEXT");
 4146
 4147                    b.Property<string>("DisplayName")
 4148                        .HasMaxLength(200)
 4149                        .HasColumnType("TEXT");
 4150
 4151                    b.Property<string>("Email")
 4152                        .HasMaxLength(320)
 4153                        .HasColumnType("TEXT");
 4154
 4155                    b.Property<DateTime?>("LastLoginOnUtc")
 4156                        .HasPrecision(3)
 4157                        .HasColumnType("TEXT");
 4158
 4159                    b.Property<Guid>("LocalUserId")
 4160                        .HasColumnType("TEXT");
 4161
 4162                    b.Property<string>("NormalizedEmail")
 4163                        .HasMaxLength(320)
 4164                        .HasColumnType("TEXT");
 4165
 4166                    b.Property<string>("NormalizedProviderName")
 4167                        .IsRequired()
 4168                        .HasMaxLength(100)
 4169                        .HasColumnType("TEXT");
 4170
 4171                    b.Property<string>("ProviderName")
 4172                        .IsRequired()
 4173                        .HasMaxLength(100)
 4174                        .HasColumnType("TEXT");
 4175
 4176                    b.Property<string>("ProviderUserId")
 4177                        .IsRequired()
 4178                        .HasMaxLength(256)
 4179                        .HasColumnType("TEXT");
 4180
 4181                    b.Property<DateTime?>("UpdatedOnUtc")
 4182                        .HasPrecision(3)
 4183                        .HasColumnType("TEXT");
 4184
 4185                    b.HasKey("Id");
 4186                    b.HasIndex("Email");
 4187                    b.HasIndex("LocalUserId");
 4188                    b.HasIndex("NormalizedEmail");
 4189                    b.HasIndex("NormalizedProviderName", "ProviderUserId")
 4190                        .IsUnique();
 4191
 4192                    b.ToTable("ExternalLoginAccounts", (string)null);
 8193                });
 194#pragma warning restore 612, 618
 4195        }
 196    }
 197}