< Summary

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

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/Migrations/Identity/20260731030043_V3_8.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_8 : Migration
 9    {
 10        private readonly Elsa.Persistence.EFCore.IElsaDbContextSchema _schema;
 11
 12        /// <inheritdoc />
 013        public V3_8(Elsa.Persistence.EFCore.IElsaDbContextSchema schema)
 14        {
 015            _schema = schema;
 016        }
 17
 18        /// <inheritdoc />
 19        protected override void Up(MigrationBuilder migrationBuilder)
 20        {
 021            migrationBuilder.AlterColumn<string>(
 022                name: "HashedPasswordSalt",
 023                schema: _schema.Schema,
 024                table: "Users",
 025                type: "text",
 026                nullable: true,
 027                oldClrType: typeof(string),
 028                oldType: "text");
 29
 030            migrationBuilder.AlterColumn<string>(
 031                name: "HashedPassword",
 032                schema: _schema.Schema,
 033                table: "Users",
 034                type: "text",
 035                nullable: true,
 036                oldClrType: typeof(string),
 037                oldType: "text");
 038        }
 39
 40        /// <inheritdoc />
 41        protected override void Down(MigrationBuilder migrationBuilder)
 42        {
 043            migrationBuilder.AlterColumn<string>(
 044                name: "HashedPasswordSalt",
 045                schema: _schema.Schema,
 046                table: "Users",
 047                type: "text",
 048                nullable: false,
 049                defaultValue: "",
 050                oldClrType: typeof(string),
 051                oldType: "text",
 052                oldNullable: true);
 53
 054            migrationBuilder.AlterColumn<string>(
 055                name: "HashedPassword",
 056                schema: _schema.Schema,
 057                table: "Users",
 058                type: "text",
 059                nullable: false,
 060                defaultValue: "",
 061                oldClrType: typeof(string),
 062                oldType: "text",
 063                oldNullable: true);
 064        }
 65    }
 66}

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/Migrations/Identity/20260731030043_V3_8.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("20260731030043_V3_8")]
 15    partial class V3_8
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 021            modelBuilder
 022                .HasDefaultSchema("Elsa")
 023                .HasAnnotation("ProductVersion", "9.0.17")
 024                .HasAnnotation("Relational:MaxIdentifierLength", 63);
 25
 026            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 27
 028            modelBuilder.Entity("Elsa.Identity.Entities.Application", b =>
 029                {
 030                    b.Property<string>("Id")
 031                        .HasColumnType("text");
 032
 033                    b.Property<string>("ClientId")
 034                        .IsRequired()
 035                        .HasColumnType("text");
 036
 037                    b.Property<string>("HashedApiKey")
 038                        .IsRequired()
 039                        .HasColumnType("text");
 040
 041                    b.Property<string>("HashedApiKeySalt")
 042                        .IsRequired()
 043                        .HasColumnType("text");
 044
 045                    b.Property<string>("HashedClientSecret")
 046                        .IsRequired()
 047                        .HasColumnType("text");
 048
 049                    b.Property<string>("HashedClientSecretSalt")
 050                        .IsRequired()
 051                        .HasColumnType("text");
 052
 053                    b.Property<string>("Name")
 054                        .IsRequired()
 055                        .HasColumnType("text");
 056
 057                    b.Property<string>("Roles")
 058                        .IsRequired()
 059                        .HasColumnType("text")
 060                        .HasColumnName("Roles");
 061
 062                    b.Property<string>("TenantId")
 063                        .HasColumnType("text");
 064
 065                    b.HasKey("Id");
 066
 067                    b.HasIndex("ClientId")
 068                        .IsUnique()
 069                        .HasDatabaseName("IX_Application_ClientId");
 070
 071                    b.HasIndex("Name")
 072                        .IsUnique()
 073                        .HasDatabaseName("IX_Application_Name");
 074
 075                    b.HasIndex("TenantId")
 076                        .HasDatabaseName("IX_Application_TenantId");
 077
 078                    b.ToTable("Applications", "Elsa");
 079                });
 80
 081            modelBuilder.Entity("Elsa.Identity.Entities.Role", b =>
 082                {
 083                    b.Property<string>("Id")
 084                        .HasColumnType("text");
 085
 086                    b.Property<string>("Name")
 087                        .IsRequired()
 088                        .HasColumnType("text");
 089
 090                    b.Property<string>("Permissions")
 091                        .IsRequired()
 092                        .HasColumnType("text")
 093                        .HasColumnName("Permissions");
 094
 095                    b.Property<string>("TenantId")
 096                        .HasColumnType("text");
 097
 098                    b.HasKey("Id");
 099
 0100                    b.HasIndex("Name")
 0101                        .IsUnique()
 0102                        .HasDatabaseName("IX_Role_Name");
 0103
 0104                    b.HasIndex("TenantId")
 0105                        .HasDatabaseName("IX_Role_TenantId");
 0106
 0107                    b.ToTable("Roles", "Elsa");
 0108                });
 109
 0110            modelBuilder.Entity("Elsa.Identity.Entities.User", b =>
 0111                {
 0112                    b.Property<string>("Id")
 0113                        .HasColumnType("text");
 0114
 0115                    b.Property<string>("HashedPassword")
 0116                        .HasColumnType("text");
 0117
 0118                    b.Property<string>("HashedPasswordSalt")
 0119                        .HasColumnType("text");
 0120
 0121                    b.Property<string>("Name")
 0122                        .IsRequired()
 0123                        .HasColumnType("text");
 0124
 0125                    b.Property<string>("Roles")
 0126                        .IsRequired()
 0127                        .HasColumnType("text")
 0128                        .HasColumnName("Roles");
 0129
 0130                    b.Property<string>("TenantId")
 0131                        .HasColumnType("text");
 0132
 0133                    b.HasKey("Id");
 0134
 0135                    b.HasIndex("Name")
 0136                        .IsUnique()
 0137                        .HasDatabaseName("IX_User_Name");
 0138
 0139                    b.HasIndex("TenantId")
 0140                        .HasDatabaseName("IX_User_TenantId");
 0141
 0142                    b.ToTable("Users", "Elsa");
 0143                });
 144#pragma warning restore 612, 618
 0145        }
 146    }
 147}