< 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    {
 113        migrationBuilder.DropIndex(
 114            name: "IX_ExternalLoginAccounts_ProviderName_ProviderUserId",
 115            table: "ExternalLoginAccounts");
 16
 117        migrationBuilder.AddColumn<string>(
 118            name: "NormalizedEmail",
 119            table: "ExternalLoginAccounts",
 120            type: "TEXT",
 121            maxLength: 320,
 122            nullable: true);
 23
 124        migrationBuilder.AddColumn<string>(
 125            name: "NormalizedProviderName",
 126            table: "ExternalLoginAccounts",
 127            type: "TEXT",
 128            maxLength: 100,
 129            nullable: false,
 130            defaultValue: "");
 31
 132        migrationBuilder.CreateIndex(
 133            name: "IX_ExternalLoginAccounts_NormalizedEmail",
 134            table: "ExternalLoginAccounts",
 135            column: "NormalizedEmail");
 36
 137        migrationBuilder.CreateIndex(
 138            name: "IX_ExternalLoginAccounts_NormalizedProviderName_ProviderUserId",
 139            table: "ExternalLoginAccounts",
 140            columns: ["NormalizedProviderName", "ProviderUserId"],
 141            unique: true);
 142    }
 43
 44    /// <inheritdoc />
 45    protected override void Down(MigrationBuilder migrationBuilder)
 46    {
 147        migrationBuilder.DropIndex(
 148            name: "IX_ExternalLoginAccounts_NormalizedEmail",
 149            table: "ExternalLoginAccounts");
 50
 151        migrationBuilder.DropIndex(
 152            name: "IX_ExternalLoginAccounts_NormalizedProviderName_ProviderUserId",
 153            table: "ExternalLoginAccounts");
 54
 155        migrationBuilder.DropColumn(
 156            name: "NormalizedEmail",
 157            table: "ExternalLoginAccounts");
 58
 159        migrationBuilder.DropColumn(
 160            name: "NormalizedProviderName",
 161            table: "ExternalLoginAccounts");
 62
 163        migrationBuilder.CreateIndex(
 164            name: "IX_ExternalLoginAccounts_ProviderName_ProviderUserId",
 165            table: "ExternalLoginAccounts",
 166            columns: ["ProviderName", "ProviderUserId"],
 167            unique: true);
 168    }
 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
 121            modelBuilder.HasAnnotation("ProductVersion", "10.0.8");
 22
 123            modelBuilder.Entity("ProjectTemplate.Infrastructure.Data.Entities.AuditRecord", b =>
 124                {
 125                    b.Property<Guid>("Id")
 126                        .HasColumnType("TEXT");
 127
 128                    b.Property<string>("Application")
 129                        .IsRequired()
 130                        .HasMaxLength(200)
 131                        .HasColumnType("TEXT");
 132
 133                    b.Property<string>("ConcurrencyStamp")
 134                        .IsConcurrencyToken()
 135                        .IsRequired()
 136                        .HasMaxLength(64)
 137                        .HasColumnType("TEXT");
 138
 139                    b.Property<string>("CurrentValues")
 140                        .IsRequired()
 141                        .HasColumnType("TEXT");
 142
 143                    b.Property<string>("Entity")
 144                        .IsRequired()
 145                        .HasMaxLength(200)
 146                        .HasColumnType("TEXT");
 147
 148                    b.Property<string>("KeyValues")
 149                        .IsRequired()
 150                        .HasColumnType("TEXT");
 151
 152                    b.Property<string>("ModifiedBy")
 153                        .IsRequired()
 154                        .HasMaxLength(200)
 155                        .HasColumnType("TEXT");
 156
 157                    b.Property<DateTime>("ModifiedOnUtc")
 158                        .HasColumnType("TEXT");
 159
 160                    b.Property<string>("OriginalValues")
 161                        .IsRequired()
 162                        .HasColumnType("TEXT");
 163
 164                    b.Property<string>("State")
 165                        .IsRequired()
 166                        .HasMaxLength(100)
 167                        .HasColumnType("TEXT");
 168
 169                    b.HasKey("Id");
 170
 171                    b.ToTable("AuditRecords", (string)null);
 172                });
 73
 174            modelBuilder.Entity("ProjectTemplate.Infrastructure.Data.Entities.ExternalLoginAccount", b =>
 175                {
 176                    b.Property<Guid>("Id")
 177                        .HasColumnType("TEXT");
 178
 179                    b.Property<string>("ConcurrencyStamp")
 180                        .IsConcurrencyToken()
 181                        .IsRequired()
 182                        .HasMaxLength(64)
 183                        .HasColumnType("TEXT");
 184
 185                    b.Property<DateTime>("CreatedOnUtc")
 186                        .HasColumnType("TEXT");
 187
 188                    b.Property<string>("DisplayName")
 189                        .HasMaxLength(200)
 190                        .HasColumnType("TEXT");
 191
 192                    b.Property<string>("Email")
 193                        .HasMaxLength(320)
 194                        .HasColumnType("TEXT");
 195
 196                    b.Property<DateTime?>("LastLoginOnUtc")
 197                        .HasColumnType("TEXT");
 198
 199                    b.Property<Guid>("LocalUserId")
 1100                        .HasColumnType("TEXT");
 1101
 1102                    b.Property<string>("NormalizedEmail")
 1103                        .HasMaxLength(320)
 1104                        .HasColumnType("TEXT");
 1105
 1106                    b.Property<string>("NormalizedProviderName")
 1107                        .IsRequired()
 1108                        .HasMaxLength(100)
 1109                        .HasColumnType("TEXT");
 1110
 1111                    b.Property<string>("ProviderName")
 1112                        .IsRequired()
 1113                        .HasMaxLength(100)
 1114                        .HasColumnType("TEXT");
 1115
 1116                    b.Property<string>("ProviderUserId")
 1117                        .IsRequired()
 1118                        .HasMaxLength(256)
 1119                        .HasColumnType("TEXT");
 1120
 1121                    b.Property<DateTime?>("UpdatedOnUtc")
 1122                        .HasColumnType("TEXT");
 1123
 1124                    b.HasKey("Id");
 1125
 1126                    b.HasIndex("Email");
 1127
 1128                    b.HasIndex("LocalUserId");
 1129
 1130                    b.HasIndex("NormalizedEmail");
 1131
 1132                    b.HasIndex("NormalizedProviderName", "ProviderUserId")
 1133                        .IsUnique();
 1134
 1135                    b.ToTable("ExternalLoginAccounts", (string)null);
 1136                });
 137#pragma warning restore 612, 618
 1138        }
 139    }
 140}