< 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    {
 113        migrationBuilder.AddColumn<string>(
 114            name: "ActorId",
 115            table: "AuditRecords",
 116            type: "TEXT",
 117            maxLength: 256,
 118            nullable: false,
 119            defaultValue: "Unknown");
 20
 121        migrationBuilder.AddColumn<string>(
 122            name: "ActorType",
 123            table: "AuditRecords",
 124            type: "TEXT",
 125            maxLength: 64,
 126            nullable: false,
 127            defaultValue: "Unknown");
 28
 129        migrationBuilder.AddColumn<string>(
 130            name: "CorrelationId",
 131            table: "AuditRecords",
 132            type: "TEXT",
 133            maxLength: 128,
 134            nullable: true);
 35
 136        migrationBuilder.AddColumn<string>(
 137            name: "DecisionAuditRecordId",
 138            table: "AuditRecords",
 139            type: "TEXT",
 140            maxLength: 128,
 141            nullable: true);
 42
 143        migrationBuilder.AddColumn<string>(
 144            name: "ExecutionAttemptId",
 145            table: "AuditRecords",
 146            type: "TEXT",
 147            maxLength: 128,
 148            nullable: true);
 49
 150        migrationBuilder.AddColumn<string>(
 151            name: "MutationBatchId",
 152            table: "AuditRecords",
 153            type: "TEXT",
 154            maxLength: 64,
 155            nullable: false,
 156            defaultValue: "legacy");
 57
 158        migrationBuilder.AddColumn<string>(
 159            name: "OperationExecutionId",
 160            table: "AuditRecords",
 161            type: "TEXT",
 162            maxLength: 128,
 163            nullable: true);
 64
 165        migrationBuilder.AddColumn<string>(
 166            name: "OrganizationHash",
 167            table: "AuditRecords",
 168            type: "TEXT",
 169            maxLength: 128,
 170            nullable: true);
 71
 172        migrationBuilder.AddColumn<string>(
 173            name: "SchemaVersion",
 174            table: "AuditRecords",
 175            type: "TEXT",
 176            maxLength: 32,
 177            nullable: false,
 178            defaultValue: "1.0");
 79
 180        migrationBuilder.AddColumn<string>(
 181            name: "SpanId",
 182            table: "AuditRecords",
 183            type: "TEXT",
 184            maxLength: 32,
 185            nullable: true);
 86
 187        migrationBuilder.AddColumn<string>(
 188            name: "TenantHash",
 189            table: "AuditRecords",
 190            type: "TEXT",
 191            maxLength: 128,
 192            nullable: true);
 93
 194        migrationBuilder.AddColumn<string>(
 195            name: "TraceId",
 196            table: "AuditRecords",
 197            type: "TEXT",
 198            maxLength: 64,
 199            nullable: true);
 100
 1101        migrationBuilder.CreateIndex(
 1102            name: "IX_AuditRecords_CorrelationId",
 1103            table: "AuditRecords",
 1104            column: "CorrelationId");
 105
 1106        migrationBuilder.CreateIndex(
 1107            name: "IX_AuditRecords_DecisionAuditRecordId",
 1108            table: "AuditRecords",
 1109            column: "DecisionAuditRecordId");
 110
 1111        migrationBuilder.CreateIndex(
 1112            name: "IX_AuditRecords_MutationBatchId",
 1113            table: "AuditRecords",
 1114            column: "MutationBatchId");
 115
 1116        migrationBuilder.CreateIndex(
 1117            name: "IX_AuditRecords_OperationExecutionId",
 1118            table: "AuditRecords",
 1119            column: "OperationExecutionId");
 1120    }
 121
 122    /// <inheritdoc />
 123    protected override void Down(MigrationBuilder migrationBuilder)
 124    {
 1125        migrationBuilder.DropIndex(
 1126            name: "IX_AuditRecords_CorrelationId",
 1127            table: "AuditRecords");
 128
 1129        migrationBuilder.DropIndex(
 1130            name: "IX_AuditRecords_DecisionAuditRecordId",
 1131            table: "AuditRecords");
 132
 1133        migrationBuilder.DropIndex(
 1134            name: "IX_AuditRecords_MutationBatchId",
 1135            table: "AuditRecords");
 136
 1137        migrationBuilder.DropIndex(
 1138            name: "IX_AuditRecords_OperationExecutionId",
 1139            table: "AuditRecords");
 140
 1141        migrationBuilder.DropColumn(name: "ActorId", table: "AuditRecords");
 1142        migrationBuilder.DropColumn(name: "ActorType", table: "AuditRecords");
 1143        migrationBuilder.DropColumn(name: "CorrelationId", table: "AuditRecords");
 1144        migrationBuilder.DropColumn(name: "DecisionAuditRecordId", table: "AuditRecords");
 1145        migrationBuilder.DropColumn(name: "ExecutionAttemptId", table: "AuditRecords");
 1146        migrationBuilder.DropColumn(name: "MutationBatchId", table: "AuditRecords");
 1147        migrationBuilder.DropColumn(name: "OperationExecutionId", table: "AuditRecords");
 1148        migrationBuilder.DropColumn(name: "OrganizationHash", table: "AuditRecords");
 1149        migrationBuilder.DropColumn(name: "SchemaVersion", table: "AuditRecords");
 1150        migrationBuilder.DropColumn(name: "SpanId", table: "AuditRecords");
 1151        migrationBuilder.DropColumn(name: "TenantHash", table: "AuditRecords");
 1152        migrationBuilder.DropColumn(name: "TraceId", table: "AuditRecords");
 1153    }
 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
 221            modelBuilder.HasAnnotation("ProductVersion", "10.0.8");
 22
 223            modelBuilder.Entity("ProjectTemplate.Infrastructure.Data.Entities.AuditRecord", b =>
 224                {
 225                    b.Property<Guid>("Id")
 226                        .HasColumnType("TEXT");
 227
 228                    b.Property<string>("ActorId")
 229                        .IsRequired()
 230                        .HasMaxLength(256)
 231                        .HasColumnType("TEXT");
 232
 233                    b.Property<string>("ActorType")
 234                        .IsRequired()
 235                        .HasMaxLength(64)
 236                        .HasColumnType("TEXT");
 237
 238                    b.Property<string>("Application")
 239                        .IsRequired()
 240                        .HasMaxLength(200)
 241                        .HasColumnType("TEXT");
 242
 243                    b.Property<string>("ConcurrencyStamp")
 244                        .IsConcurrencyToken()
 245                        .IsRequired()
 246                        .HasMaxLength(64)
 247                        .HasColumnType("TEXT");
 248
 249                    b.Property<string>("CorrelationId")
 250                        .HasMaxLength(128)
 251                        .HasColumnType("TEXT");
 252
 253                    b.Property<string>("CurrentValues")
 254                        .IsRequired()
 255                        .HasColumnType("TEXT");
 256
 257                    b.Property<string>("DecisionAuditRecordId")
 258                        .HasMaxLength(128)
 259                        .HasColumnType("TEXT");
 260
 261                    b.Property<string>("Entity")
 262                        .IsRequired()
 263                        .HasMaxLength(200)
 264                        .HasColumnType("TEXT");
 265
 266                    b.Property<string>("ExecutionAttemptId")
 267                        .HasMaxLength(128)
 268                        .HasColumnType("TEXT");
 269
 270                    b.Property<string>("KeyValues")
 271                        .IsRequired()
 272                        .HasColumnType("TEXT");
 273
 274                    b.Property<string>("ModifiedBy")
 275                        .IsRequired()
 276                        .HasMaxLength(200)
 277                        .HasColumnType("TEXT");
 278
 279                    b.Property<DateTime>("ModifiedOnUtc")
 280                        .HasPrecision(3)
 281                        .HasColumnType("TEXT");
 282
 283                    b.Property<string>("MutationBatchId")
 284                        .IsRequired()
 285                        .HasMaxLength(64)
 286                        .HasColumnType("TEXT");
 287
 288                    b.Property<string>("OperationExecutionId")
 289                        .HasMaxLength(128)
 290                        .HasColumnType("TEXT");
 291
 292                    b.Property<string>("OrganizationHash")
 293                        .HasMaxLength(128)
 294                        .HasColumnType("TEXT");
 295
 296                    b.Property<string>("OriginalValues")
 297                        .IsRequired()
 298                        .HasColumnType("TEXT");
 299
 2100                    b.Property<string>("SchemaVersion")
 2101                        .IsRequired()
 2102                        .HasMaxLength(32)
 2103                        .HasColumnType("TEXT");
 2104
 2105                    b.Property<string>("SpanId")
 2106                        .HasMaxLength(32)
 2107                        .HasColumnType("TEXT");
 2108
 2109                    b.Property<string>("State")
 2110                        .IsRequired()
 2111                        .HasMaxLength(100)
 2112                        .HasColumnType("TEXT");
 2113
 2114                    b.Property<string>("TenantHash")
 2115                        .HasMaxLength(128)
 2116                        .HasColumnType("TEXT");
 2117
 2118                    b.Property<string>("TraceId")
 2119                        .HasMaxLength(64)
 2120                        .HasColumnType("TEXT");
 2121
 2122                    b.HasKey("Id");
 2123
 2124                    b.HasIndex("CorrelationId");
 2125                    b.HasIndex("DecisionAuditRecordId");
 2126                    b.HasIndex("MutationBatchId");
 2127                    b.HasIndex("OperationExecutionId");
 2128
 2129                    b.ToTable("AuditRecords", (string)null);
 2130                });
 131
 2132            modelBuilder.Entity("ProjectTemplate.Infrastructure.Data.Entities.ExternalLoginAccount", b =>
 2133                {
 2134                    b.Property<Guid>("Id")
 2135                        .HasColumnType("TEXT");
 2136
 2137                    b.Property<string>("ConcurrencyStamp")
 2138                        .IsConcurrencyToken()
 2139                        .IsRequired()
 2140                        .HasMaxLength(64)
 2141                        .HasColumnType("TEXT");
 2142
 2143                    b.Property<DateTime>("CreatedOnUtc")
 2144                        .HasPrecision(3)
 2145                        .HasColumnType("TEXT");
 2146
 2147                    b.Property<string>("DisplayName")
 2148                        .HasMaxLength(200)
 2149                        .HasColumnType("TEXT");
 2150
 2151                    b.Property<string>("Email")
 2152                        .HasMaxLength(320)
 2153                        .HasColumnType("TEXT");
 2154
 2155                    b.Property<DateTime?>("LastLoginOnUtc")
 2156                        .HasPrecision(3)
 2157                        .HasColumnType("TEXT");
 2158
 2159                    b.Property<Guid>("LocalUserId")
 2160                        .HasColumnType("TEXT");
 2161
 2162                    b.Property<string>("NormalizedEmail")
 2163                        .HasMaxLength(320)
 2164                        .HasColumnType("TEXT");
 2165
 2166                    b.Property<string>("NormalizedProviderName")
 2167                        .IsRequired()
 2168                        .HasMaxLength(100)
 2169                        .HasColumnType("TEXT");
 2170
 2171                    b.Property<string>("ProviderName")
 2172                        .IsRequired()
 2173                        .HasMaxLength(100)
 2174                        .HasColumnType("TEXT");
 2175
 2176                    b.Property<string>("ProviderUserId")
 2177                        .IsRequired()
 2178                        .HasMaxLength(256)
 2179                        .HasColumnType("TEXT");
 2180
 2181                    b.Property<DateTime?>("UpdatedOnUtc")
 2182                        .HasPrecision(3)
 2183                        .HasColumnType("TEXT");
 2184
 2185                    b.HasKey("Id");
 2186                    b.HasIndex("Email");
 2187                    b.HasIndex("LocalUserId");
 2188                    b.HasIndex("NormalizedEmail");
 2189                    b.HasIndex("NormalizedProviderName", "ProviderUserId")
 2190                        .IsUnique();
 2191
 2192                    b.ToTable("ExternalLoginAccounts", (string)null);
 2193                });
 194#pragma warning restore 612, 618
 2195        }
 196    }
 197}