< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 151
Coverable lines: 151
Total lines: 205
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.Sqlite/Migrations/Identity/20250222190924_V3_4.cs

#LineLine coverage
 1using Elsa.Extensions;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3
 4#nullable disable
 5
 6namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Identity
 7{
 8    /// <inheritdoc />
 9    public partial class V3_4 : Migration
 10    {
 11        private readonly Elsa.Persistence.EFCore.IElsaDbContextSchema _schema;
 12
 13        /// <inheritdoc />
 014        public V3_4(Elsa.Persistence.EFCore.IElsaDbContextSchema schema)
 15        {
 016            _schema = schema;
 017        }
 18
 19        /// <inheritdoc />
 20        protected override void Up(MigrationBuilder migrationBuilder)
 21        {
 022            migrationBuilder.EnsureSchema(
 023                name: _schema.Schema);
 24
 025            migrationBuilder.RenameTable(
 026                name: "Users",
 027                newName: "Users",
 028                newSchema: _schema.Schema);
 29
 030            migrationBuilder.RenameTable(
 031                name: "Roles",
 032                newName: "Roles",
 033                newSchema: _schema.Schema);
 34
 035            migrationBuilder.RenameTable(
 036                name: "Applications",
 037                newName: "Applications",
 038                newSchema: _schema.Schema);
 039        }
 40
 41        /// <inheritdoc />
 42        protected override void Down(MigrationBuilder migrationBuilder)
 43        {
 044            migrationBuilder.RenameTable(
 045                name: "Users",
 046                schema: _schema.Schema,
 047                newName: "Users");
 48
 049            migrationBuilder.RenameTable(
 050                name: "Roles",
 051                schema: _schema.Schema,
 052                newName: "Roles");
 53
 054            migrationBuilder.RenameTable(
 055                name: "Applications",
 056                schema: _schema.Schema,
 057                newName: "Applications");
 058        }
 59    }
 60}

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Sqlite/Migrations/Identity/20250222190924_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;
 7
 8#nullable disable
 9
 10namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Identity
 11{
 12    [DbContext(typeof(IdentityElsaDbContext))]
 13    [Migration("20250222190924_V3_4")]
 14    partial class V3_4
 15    {
 16        /// <inheritdoc />
 17        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 18        {
 19#pragma warning disable 612, 618
 020            modelBuilder
 021                .HasDefaultSchema("Elsa")
 022                .HasAnnotation("ProductVersion", "8.0.12");
 23
 024            modelBuilder.Entity("Elsa.Identity.Entities.Application", b =>
 025                {
 026                    b.Property<string>("Id")
 027                        .HasColumnType("TEXT");
 028
 029                    b.Property<string>("ClientId")
 030                        .IsRequired()
 031                        .HasColumnType("TEXT");
 032
 033                    b.Property<string>("HashedApiKey")
 034                        .IsRequired()
 035                        .HasColumnType("TEXT");
 036
 037                    b.Property<string>("HashedApiKeySalt")
 038                        .IsRequired()
 039                        .HasColumnType("TEXT");
 040
 041                    b.Property<string>("HashedClientSecret")
 042                        .IsRequired()
 043                        .HasColumnType("TEXT");
 044
 045                    b.Property<string>("HashedClientSecretSalt")
 046                        .IsRequired()
 047                        .HasColumnType("TEXT");
 048
 049                    b.Property<string>("Name")
 050                        .IsRequired()
 051                        .HasColumnType("TEXT");
 052
 053                    b.Property<string>("Roles")
 054                        .IsRequired()
 055                        .HasColumnType("TEXT")
 056                        .HasColumnName("Roles");
 057
 058                    b.Property<string>("TenantId")
 059                        .HasColumnType("TEXT");
 060
 061                    b.HasKey("Id");
 062
 063                    b.HasIndex("ClientId")
 064                        .IsUnique()
 065                        .HasDatabaseName("IX_Application_ClientId");
 066
 067                    b.HasIndex("Name")
 068                        .IsUnique()
 069                        .HasDatabaseName("IX_Application_Name");
 070
 071                    b.HasIndex("TenantId")
 072                        .HasDatabaseName("IX_Application_TenantId");
 073
 074                    b.ToTable("Applications", "Elsa");
 075                });
 76
 077            modelBuilder.Entity("Elsa.Identity.Entities.Role", b =>
 078                {
 079                    b.Property<string>("Id")
 080                        .HasColumnType("TEXT");
 081
 082                    b.Property<string>("Name")
 083                        .IsRequired()
 084                        .HasColumnType("TEXT");
 085
 086                    b.Property<string>("Permissions")
 087                        .IsRequired()
 088                        .HasColumnType("TEXT")
 089                        .HasColumnName("Permissions");
 090
 091                    b.Property<string>("TenantId")
 092                        .HasColumnType("TEXT");
 093
 094                    b.HasKey("Id");
 095
 096                    b.HasIndex("Name")
 097                        .IsUnique()
 098                        .HasDatabaseName("IX_Role_Name");
 099
 0100                    b.HasIndex("TenantId")
 0101                        .HasDatabaseName("IX_Role_TenantId");
 0102
 0103                    b.ToTable("Roles", "Elsa");
 0104                });
 105
 0106            modelBuilder.Entity("Elsa.Identity.Entities.User", b =>
 0107                {
 0108                    b.Property<string>("Id")
 0109                        .HasColumnType("TEXT");
 0110
 0111                    b.Property<string>("HashedPassword")
 0112                        .IsRequired()
 0113                        .HasColumnType("TEXT");
 0114
 0115                    b.Property<string>("HashedPasswordSalt")
 0116                        .IsRequired()
 0117                        .HasColumnType("TEXT");
 0118
 0119                    b.Property<string>("Name")
 0120                        .IsRequired()
 0121                        .HasColumnType("TEXT");
 0122
 0123                    b.Property<string>("Roles")
 0124                        .IsRequired()
 0125                        .HasColumnType("TEXT")
 0126                        .HasColumnName("Roles");
 0127
 0128                    b.Property<string>("TenantId")
 0129                        .HasColumnType("TEXT");
 0130
 0131                    b.HasKey("Id");
 0132
 0133                    b.HasIndex("Name")
 0134                        .IsUnique()
 0135                        .HasDatabaseName("IX_User_Name");
 0136
 0137                    b.HasIndex("TenantId")
 0138                        .HasDatabaseName("IX_User_TenantId");
 0139
 0140                    b.ToTable("Users", "Elsa");
 0141                });
 142#pragma warning restore 612, 618
 0143        }
 144    }
 145}