< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 140
Coverable lines: 140
Total lines: 194
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/Alterations/20241212211547_V3_3.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Alterations
 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.AddColumn<string>(
 022                name: "TenantId",
 023                table: "AlterationPlans",
 024                type: "TEXT",
 025                nullable: true);
 26
 027            migrationBuilder.AddColumn<string>(
 028                name: "TenantId",
 029                table: "AlterationJobs",
 030                type: "TEXT",
 031                nullable: true);
 32
 033            migrationBuilder.CreateIndex(
 034                name: "IX_AlterationPlan_TenantId",
 035                table: "AlterationPlans",
 036                column: "TenantId");
 37
 038            migrationBuilder.CreateIndex(
 039                name: "IX_AlterationJob_TenantId",
 040                table: "AlterationJobs",
 041                column: "TenantId");
 042        }
 43
 44        /// <inheritdoc />
 45        protected override void Down(MigrationBuilder migrationBuilder)
 46        {
 047            migrationBuilder.DropIndex(
 048                name: "IX_AlterationPlan_TenantId",
 049                table: "AlterationPlans");
 50
 051            migrationBuilder.DropIndex(
 052                name: "IX_AlterationJob_TenantId",
 053                table: "AlterationJobs");
 54
 055            migrationBuilder.DropColumn(
 056                name: "TenantId",
 057                table: "AlterationPlans");
 58
 059            migrationBuilder.DropColumn(
 060                name: "TenantId",
 061                table: "AlterationJobs");
 062        }
 63    }
 64}

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

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Elsa.Persistence.EFCore.Modules.Alterations;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8
 9#nullable disable
 10
 11namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Alterations
 12{
 13    [DbContext(typeof(AlterationsElsaDbContext))]
 14    [Migration("20241212211547_V3_3")]
 15    partial class V3_3
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 021            modelBuilder.HasAnnotation("ProductVersion", "7.0.20");
 22
 023            modelBuilder.Entity("Elsa.Alterations.Core.Entities.AlterationJob", b =>
 024                {
 025                    b.Property<string>("Id")
 026                        .HasColumnType("TEXT");
 027
 028                    b.Property<DateTimeOffset?>("CompletedAt")
 029                        .HasColumnType("TEXT");
 030
 031                    b.Property<DateTimeOffset>("CreatedAt")
 032                        .HasColumnType("TEXT");
 033
 034                    b.Property<string>("PlanId")
 035                        .IsRequired()
 036                        .HasColumnType("TEXT");
 037
 038                    b.Property<string>("SerializedLog")
 039                        .HasColumnType("TEXT");
 040
 041                    b.Property<DateTimeOffset?>("StartedAt")
 042                        .HasColumnType("TEXT");
 043
 044                    b.Property<string>("Status")
 045                        .IsRequired()
 046                        .HasColumnType("TEXT");
 047
 048                    b.Property<string>("TenantId")
 049                        .HasColumnType("TEXT");
 050
 051                    b.Property<string>("WorkflowInstanceId")
 052                        .IsRequired()
 053                        .HasColumnType("TEXT");
 054
 055                    b.HasKey("Id");
 056
 057                    b.HasIndex("CompletedAt")
 058                        .HasDatabaseName("IX_AlterationJob_CompletedAt");
 059
 060                    b.HasIndex("CreatedAt")
 061                        .HasDatabaseName("IX_AlterationJob_CreatedAt");
 062
 063                    b.HasIndex("PlanId")
 064                        .HasDatabaseName("IX_AlterationJob_PlanId");
 065
 066                    b.HasIndex("StartedAt")
 067                        .HasDatabaseName("IX_AlterationJob_StartedAt");
 068
 069                    b.HasIndex("Status")
 070                        .HasDatabaseName("IX_AlterationJob_Status");
 071
 072                    b.HasIndex("TenantId")
 073                        .HasDatabaseName("IX_AlterationJob_TenantId");
 074
 075                    b.HasIndex("WorkflowInstanceId")
 076                        .HasDatabaseName("IX_AlterationJob_WorkflowInstanceId");
 077
 078                    b.ToTable("AlterationJobs");
 079                });
 80
 081            modelBuilder.Entity("Elsa.Alterations.Core.Entities.AlterationPlan", b =>
 082                {
 083                    b.Property<string>("Id")
 084                        .HasColumnType("TEXT");
 085
 086                    b.Property<DateTimeOffset?>("CompletedAt")
 087                        .HasColumnType("TEXT");
 088
 089                    b.Property<DateTimeOffset>("CreatedAt")
 090                        .HasColumnType("TEXT");
 091
 092                    b.Property<string>("SerializedAlterations")
 093                        .HasColumnType("TEXT");
 094
 095                    b.Property<string>("SerializedWorkflowInstanceFilter")
 096                        .HasColumnType("TEXT");
 097
 098                    b.Property<DateTimeOffset?>("StartedAt")
 099                        .HasColumnType("TEXT");
 0100
 0101                    b.Property<string>("Status")
 0102                        .IsRequired()
 0103                        .HasColumnType("TEXT");
 0104
 0105                    b.Property<string>("TenantId")
 0106                        .HasColumnType("TEXT");
 0107
 0108                    b.HasKey("Id");
 0109
 0110                    b.HasIndex("CompletedAt")
 0111                        .HasDatabaseName("IX_AlterationPlan_CompletedAt");
 0112
 0113                    b.HasIndex("CreatedAt")
 0114                        .HasDatabaseName("IX_AlterationPlan_CreatedAt");
 0115
 0116                    b.HasIndex("StartedAt")
 0117                        .HasDatabaseName("IX_AlterationPlan_StartedAt");
 0118
 0119                    b.HasIndex("Status")
 0120                        .HasDatabaseName("IX_AlterationPlan_Status");
 0121
 0122                    b.HasIndex("TenantId")
 0123                        .HasDatabaseName("IX_AlterationPlan_TenantId");
 0124
 0125                    b.ToTable("AlterationPlans");
 0126                });
 127#pragma warning restore 612, 618
 0128        }
 129    }
 130}