< Summary

Line coverage
100%
Covered lines: 159
Uncovered lines: 0
Coverable lines: 159
Total lines: 209
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/20260530111053_AddExternalLoginAccountNormalizedLookupColumns.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace ProjectTemplate.Infrastructure.Data.Migrations;
 6
 7/// <inheritdoc />
 8public partial class AddExternalLoginAccountNormalizedLookupColumns : Migration
 9{
 10    /// <inheritdoc />
 11    protected override void Up(MigrationBuilder migrationBuilder)
 12    {
 213        migrationBuilder.DropIndex(
 214            name: "IX_ExternalLoginAccounts_ProviderName_ProviderUserId",
 215            table: "ExternalLoginAccounts");
 16
 217        migrationBuilder.AddColumn<string>(
 218            name: "NormalizedEmail",
 219            table: "ExternalLoginAccounts",
 220            type: "TEXT",
 221            maxLength: 320,
 222            nullable: true);
 23
 224        migrationBuilder.AddColumn<string>(
 225            name: "NormalizedProviderName",
 226            table: "ExternalLoginAccounts",
 227            type: "TEXT",
 228            maxLength: 100,
 229            nullable: false,
 230            defaultValue: "");
 31
 232        migrationBuilder.CreateIndex(
 233            name: "IX_ExternalLoginAccounts_NormalizedEmail",
 234            table: "ExternalLoginAccounts",
 235            column: "NormalizedEmail");
 36
 237        migrationBuilder.CreateIndex(
 238            name: "IX_ExternalLoginAccounts_NormalizedProviderName_ProviderUserId",
 239            table: "ExternalLoginAccounts",
 240            columns: ["NormalizedProviderName", "ProviderUserId"],
 241            unique: true);
 242    }
 43
 44    /// <inheritdoc />
 45    protected override void Down(MigrationBuilder migrationBuilder)
 46    {
 247        migrationBuilder.DropIndex(
 248            name: "IX_ExternalLoginAccounts_NormalizedEmail",
 249            table: "ExternalLoginAccounts");
 50
 251        migrationBuilder.DropIndex(
 252            name: "IX_ExternalLoginAccounts_NormalizedProviderName_ProviderUserId",
 253            table: "ExternalLoginAccounts");
 54
 255        migrationBuilder.DropColumn(
 256            name: "NormalizedEmail",
 257            table: "ExternalLoginAccounts");
 58
 259        migrationBuilder.DropColumn(
 260            name: "NormalizedProviderName",
 261            table: "ExternalLoginAccounts");
 62
 263        migrationBuilder.CreateIndex(
 264            name: "IX_ExternalLoginAccounts_ProviderName_ProviderUserId",
 265            table: "ExternalLoginAccounts",
 266            columns: ["ProviderName", "ProviderUserId"],
 267            unique: true);
 268    }
 69}

/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Infrastructure/Data/Migrations/20260530111053_AddExternalLoginAccountNormalizedLookupColumns.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("20260530111053_AddExternalLoginAccountNormalizedLookupColumns")]
 15    partial class AddExternalLoginAccountNormalizedLookupColumns
 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>("Application")
 229                        .IsRequired()
 230                        .HasMaxLength(200)
 231                        .HasColumnType("TEXT");
 232
 233                    b.Property<string>("ConcurrencyStamp")
 234                        .IsConcurrencyToken()
 235                        .IsRequired()
 236                        .HasMaxLength(64)
 237                        .HasColumnType("TEXT");
 238
 239                    b.Property<string>("CurrentValues")
 240                        .IsRequired()
 241                        .HasColumnType("TEXT");
 242
 243                    b.Property<string>("Entity")
 244                        .IsRequired()
 245                        .HasMaxLength(200)
 246                        .HasColumnType("TEXT");
 247
 248                    b.Property<string>("KeyValues")
 249                        .IsRequired()
 250                        .HasColumnType("TEXT");
 251
 252                    b.Property<string>("ModifiedBy")
 253                        .IsRequired()
 254                        .HasMaxLength(200)
 255                        .HasColumnType("TEXT");
 256
 257                    b.Property<DateTime>("ModifiedOnUtc")
 258                        .HasColumnType("TEXT");
 259
 260                    b.Property<string>("OriginalValues")
 261                        .IsRequired()
 262                        .HasColumnType("TEXT");
 263
 264                    b.Property<string>("State")
 265                        .IsRequired()
 266                        .HasMaxLength(100)
 267                        .HasColumnType("TEXT");
 268
 269                    b.HasKey("Id");
 270
 271                    b.ToTable("AuditRecords", (string)null);
 472                });
 73
 274            modelBuilder.Entity("ProjectTemplate.Infrastructure.Data.Entities.ExternalLoginAccount", b =>
 275                {
 276                    b.Property<Guid>("Id")
 277                        .HasColumnType("TEXT");
 278
 279                    b.Property<string>("ConcurrencyStamp")
 280                        .IsConcurrencyToken()
 281                        .IsRequired()
 282                        .HasMaxLength(64)
 283                        .HasColumnType("TEXT");
 284
 285                    b.Property<DateTime>("CreatedOnUtc")
 286                        .HasColumnType("TEXT");
 287
 288                    b.Property<string>("DisplayName")
 289                        .HasMaxLength(200)
 290                        .HasColumnType("TEXT");
 291
 292                    b.Property<string>("Email")
 293                        .HasMaxLength(320)
 294                        .HasColumnType("TEXT");
 295
 296                    b.Property<DateTime?>("LastLoginOnUtc")
 297                        .HasColumnType("TEXT");
 298
 299                    b.Property<Guid>("LocalUserId")
 2100                        .HasColumnType("TEXT");
 2101
 2102                    b.Property<string>("NormalizedEmail")
 2103                        .HasMaxLength(320)
 2104                        .HasColumnType("TEXT");
 2105
 2106                    b.Property<string>("NormalizedProviderName")
 2107                        .IsRequired()
 2108                        .HasMaxLength(100)
 2109                        .HasColumnType("TEXT");
 2110
 2111                    b.Property<string>("ProviderName")
 2112                        .IsRequired()
 2113                        .HasMaxLength(100)
 2114                        .HasColumnType("TEXT");
 2115
 2116                    b.Property<string>("ProviderUserId")
 2117                        .IsRequired()
 2118                        .HasMaxLength(256)
 2119                        .HasColumnType("TEXT");
 2120
 2121                    b.Property<DateTime?>("UpdatedOnUtc")
 2122                        .HasColumnType("TEXT");
 2123
 2124                    b.HasKey("Id");
 2125
 2126                    b.HasIndex("Email");
 2127
 2128                    b.HasIndex("LocalUserId");
 2129
 2130                    b.HasIndex("NormalizedEmail");
 2131
 2132                    b.HasIndex("NormalizedProviderName", "ProviderUserId")
 2133                        .IsUnique();
 2134
 2135                    b.ToTable("ExternalLoginAccounts", (string)null);
 4136                });
 137#pragma warning restore 612, 618
 2138        }
 139    }
 140}