< Summary

Line coverage
99%
Covered lines: 108
Uncovered lines: 1
Coverable lines: 109
Total lines: 161
Line coverage: 99%
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: .ctor(...)100%11100%
File 1: Up(...)100%11100%
File 1: Down(...)100%210%
File 2: BuildTargetModel(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/Migrations/Identity/20240329200810_V3_1.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Elsa.Persistence.EFCore.PostgreSql.Migrations.Identity
 6{
 7    /// <inheritdoc />
 8    public partial class V3_1 : Migration
 9    {
 10        private readonly IElsaDbContextSchema _schema;
 11
 12        /// <inheritdoc />
 213        public V3_1(IElsaDbContextSchema schema)
 14        {
 215            _schema = schema;
 216        }
 17
 18        /// <inheritdoc />
 19        protected override void Up(MigrationBuilder migrationBuilder)
 20        {
 21
 222        }
 23
 24        /// <inheritdoc />
 25        protected override void Down(MigrationBuilder migrationBuilder)
 26        {
 27
 028        }
 29    }
 30}

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/Migrations/Identity/20240329200810_V3_1.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using Elsa.Persistence.EFCore.Modules.Identity;
 3using Microsoft.EntityFrameworkCore;
 4using Microsoft.EntityFrameworkCore.Infrastructure;
 5using Microsoft.EntityFrameworkCore.Migrations;
 6using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 7using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
 8
 9#nullable disable
 10
 11namespace Elsa.Persistence.EFCore.PostgreSql.Migrations.Identity
 12{
 13    [DbContext(typeof(IdentityElsaDbContext))]
 14    [Migration("20240329200810_V3_1")]
 15    partial class V3_1
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 121            modelBuilder
 122                .HasDefaultSchema("Elsa")
 123                .HasAnnotation("ProductVersion", "7.0.14")
 124                .HasAnnotation("Relational:MaxIdentifierLength", 63);
 25
 126            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 27
 128            modelBuilder.Entity("Elsa.Identity.Entities.Application", b =>
 129                {
 130                    b.Property<string>("Id")
 131                        .HasColumnType("text");
 132
 133                    b.Property<string>("ClientId")
 134                        .IsRequired()
 135                        .HasColumnType("text");
 136
 137                    b.Property<string>("HashedApiKey")
 138                        .IsRequired()
 139                        .HasColumnType("text");
 140
 141                    b.Property<string>("HashedApiKeySalt")
 142                        .IsRequired()
 143                        .HasColumnType("text");
 144
 145                    b.Property<string>("HashedClientSecret")
 146                        .IsRequired()
 147                        .HasColumnType("text");
 148
 149                    b.Property<string>("HashedClientSecretSalt")
 150                        .IsRequired()
 151                        .HasColumnType("text");
 152
 153                    b.Property<string>("Name")
 154                        .IsRequired()
 155                        .HasColumnType("text");
 156
 157                    b.Property<string>("Roles")
 158                        .IsRequired()
 159                        .HasColumnType("text")
 160                        .HasColumnName("Roles");
 161
 162                    b.HasKey("Id");
 163
 164                    b.HasIndex("ClientId")
 165                        .IsUnique()
 166                        .HasDatabaseName("IX_Application_ClientId");
 167
 168                    b.HasIndex("Name")
 169                        .IsUnique()
 170                        .HasDatabaseName("IX_Application_Name");
 171
 172                    b.ToTable("Applications", "Elsa");
 273                });
 74
 175            modelBuilder.Entity("Elsa.Identity.Entities.Role", b =>
 176                {
 177                    b.Property<string>("Id")
 178                        .HasColumnType("text");
 179
 180                    b.Property<string>("Name")
 181                        .IsRequired()
 182                        .HasColumnType("text");
 183
 184                    b.Property<string>("Permissions")
 185                        .IsRequired()
 186                        .HasColumnType("text")
 187                        .HasColumnName("Permissions");
 188
 189                    b.HasKey("Id");
 190
 191                    b.HasIndex("Name")
 192                        .IsUnique()
 193                        .HasDatabaseName("IX_Role_Name");
 194
 195                    b.ToTable("Roles", "Elsa");
 296                });
 97
 198            modelBuilder.Entity("Elsa.Identity.Entities.User", b =>
 199                {
 1100                    b.Property<string>("Id")
 1101                        .HasColumnType("text");
 1102
 1103                    b.Property<string>("HashedPassword")
 1104                        .IsRequired()
 1105                        .HasColumnType("text");
 1106
 1107                    b.Property<string>("HashedPasswordSalt")
 1108                        .IsRequired()
 1109                        .HasColumnType("text");
 1110
 1111                    b.Property<string>("Name")
 1112                        .IsRequired()
 1113                        .HasColumnType("text");
 1114
 1115                    b.Property<string>("Roles")
 1116                        .IsRequired()
 1117                        .HasColumnType("text")
 1118                        .HasColumnName("Roles");
 1119
 1120                    b.HasKey("Id");
 1121
 1122                    b.HasIndex("Name")
 1123                        .IsUnique()
 1124                        .HasDatabaseName("IX_User_Name");
 1125
 1126                    b.ToTable("Users", "Elsa");
 2127                });
 128#pragma warning restore 612, 618
 1129        }
 130    }
 131}