< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 56
Coverable lines: 56
Total lines: 104
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/Tenants/20241212212154_V3_3.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Tenants
 6{
 7    /// <inheritdoc />
 8    public partial class V3_3 : Migration
 9    {
 10        private readonly Elsa.Persistence.EFCore.IElsaDbContextSchema _schema;
 11
 12        /// <inheritdoc />
 013        public V3_3(Elsa.Persistence.EFCore.IElsaDbContextSchema schema)
 14        {
 015            _schema = schema;
 016        }
 17
 18        /// <inheritdoc />
 19        protected override void Up(MigrationBuilder migrationBuilder)
 20        {
 021            migrationBuilder.CreateTable(
 022                name: "Tenants",
 023                columns: table => new
 024                {
 025                    Id = table.Column<string>(type: "TEXT", nullable: false),
 026                    Name = table.Column<string>(type: "TEXT", nullable: false),
 027                    Configuration = table.Column<string>(type: "TEXT", nullable: false),
 028                    TenantId = table.Column<string>(type: "TEXT", nullable: true)
 029                },
 030                constraints: table =>
 031                {
 032                    table.PrimaryKey("PK_Tenants", x => x.Id);
 033                });
 34
 035            migrationBuilder.CreateIndex(
 036                name: "IX_Tenant_Name",
 037                table: "Tenants",
 038                column: "Name");
 39
 040            migrationBuilder.CreateIndex(
 041                name: "IX_Tenant_TenantId",
 042                table: "Tenants",
 043                column: "TenantId");
 044        }
 45
 46        /// <inheritdoc />
 47        protected override void Down(MigrationBuilder migrationBuilder)
 48        {
 049            migrationBuilder.DropTable(
 050                name: "Tenants");
 051        }
 52    }
 53}

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Sqlite/Migrations/Tenants/20241212212154_V3_3.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using Elsa.Persistence.EFCore.Modules.Tenants;
 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.Tenants
 11{
 12    [DbContext(typeof(TenantsElsaDbContext))]
 13    [Migration("20241212212154_V3_3")]
 14    partial class V3_3
 15    {
 16        /// <inheritdoc />
 17        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 18        {
 19#pragma warning disable 612, 618
 020            modelBuilder.HasAnnotation("ProductVersion", "7.0.20");
 21
 022            modelBuilder.Entity("Elsa.Common.Multitenancy.Tenant", b =>
 023                {
 024                    b.Property<string>("Id")
 025                        .HasColumnType("TEXT");
 026
 027                    b.Property<string>("Configuration")
 028                        .IsRequired()
 029                        .HasColumnType("TEXT");
 030
 031                    b.Property<string>("Name")
 032                        .IsRequired()
 033                        .HasColumnType("TEXT");
 034
 035                    b.Property<string>("TenantId")
 036                        .HasColumnType("TEXT");
 037
 038                    b.HasKey("Id");
 039
 040                    b.HasIndex("Name")
 041                        .HasDatabaseName("IX_Tenant_Name");
 042
 043                    b.HasIndex("TenantId")
 044                        .HasDatabaseName("IX_Tenant_TenantId");
 045
 046                    b.ToTable("Tenants");
 047                });
 48#pragma warning restore 612, 618
 049        }
 50    }
 51}