< Summary

Line coverage
99%
Covered lines: 126
Uncovered lines: 1
Coverable lines: 127
Total lines: 179
Line coverage: 99.2%
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/20250222190930_V3_4.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_4 : Migration
 9    {
 10        private readonly Elsa.Persistence.EFCore.IElsaDbContextSchema _schema;
 11
 12        /// <inheritdoc />
 213        public V3_4(Elsa.Persistence.EFCore.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/20250222190930_V3_4.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("20250222190930_V3_4")]
 15    partial class V3_4
 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", "8.0.12")
 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.Property<string>("TenantId")
 163                        .HasColumnType("text");
 164
 165                    b.HasKey("Id");
 166
 167                    b.HasIndex("ClientId")
 168                        .IsUnique()
 169                        .HasDatabaseName("IX_Application_ClientId");
 170
 171                    b.HasIndex("Name")
 172                        .IsUnique()
 173                        .HasDatabaseName("IX_Application_Name");
 174
 175                    b.HasIndex("TenantId")
 176                        .HasDatabaseName("IX_Application_TenantId");
 177
 178                    b.ToTable("Applications", "Elsa");
 279                });
 80
 181            modelBuilder.Entity("Elsa.Identity.Entities.Role", b =>
 182                {
 183                    b.Property<string>("Id")
 184                        .HasColumnType("text");
 185
 186                    b.Property<string>("Name")
 187                        .IsRequired()
 188                        .HasColumnType("text");
 189
 190                    b.Property<string>("Permissions")
 191                        .IsRequired()
 192                        .HasColumnType("text")
 193                        .HasColumnName("Permissions");
 194
 195                    b.Property<string>("TenantId")
 196                        .HasColumnType("text");
 197
 198                    b.HasKey("Id");
 199
 1100                    b.HasIndex("Name")
 1101                        .IsUnique()
 1102                        .HasDatabaseName("IX_Role_Name");
 1103
 1104                    b.HasIndex("TenantId")
 1105                        .HasDatabaseName("IX_Role_TenantId");
 1106
 1107                    b.ToTable("Roles", "Elsa");
 2108                });
 109
 1110            modelBuilder.Entity("Elsa.Identity.Entities.User", b =>
 1111                {
 1112                    b.Property<string>("Id")
 1113                        .HasColumnType("text");
 1114
 1115                    b.Property<string>("HashedPassword")
 1116                        .IsRequired()
 1117                        .HasColumnType("text");
 1118
 1119                    b.Property<string>("HashedPasswordSalt")
 1120                        .IsRequired()
 1121                        .HasColumnType("text");
 1122
 1123                    b.Property<string>("Name")
 1124                        .IsRequired()
 1125                        .HasColumnType("text");
 1126
 1127                    b.Property<string>("Roles")
 1128                        .IsRequired()
 1129                        .HasColumnType("text")
 1130                        .HasColumnName("Roles");
 1131
 1132                    b.Property<string>("TenantId")
 1133                        .HasColumnType("text");
 1134
 1135                    b.HasKey("Id");
 1136
 1137                    b.HasIndex("Name")
 1138                        .IsUnique()
 1139                        .HasDatabaseName("IX_User_Name");
 1140
 1141                    b.HasIndex("TenantId")
 1142                        .HasDatabaseName("IX_User_TenantId");
 1143
 1144                    b.ToTable("Users", "Elsa");
 2145                });
 146#pragma warning restore 612, 618
 1147        }
 148    }
 149}