< Summary

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

File(s)

/home/runner/work/ClientManagerDemo/ClientManagerDemo/src/ClientManager/ClientManager.Worker/Migrations/20251029073631_InitialCreate.cs

#LineLine coverage
 1using System;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3
 4#nullable disable
 5
 6namespace ClientManager.Worker.Migrations
 7{
 8    /// <inheritdoc />
 9    public partial class InitialCreate : Migration
 10    {
 11        /// <inheritdoc />
 12        protected override void Up(MigrationBuilder migrationBuilder)
 13        {
 014            migrationBuilder.CreateTable(
 015                name: "Clients",
 016                columns: table => new
 017                {
 018                    Id = table.Column<Guid>(type: "uuid", nullable: false),
 019                    FirstName = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
 020                    LastName = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
 021                    Email = table.Column<string>(type: "text", nullable: true)
 022                },
 023                constraints: table =>
 024                {
 025                    table.PrimaryKey("PK_Clients", x => x.Id);
 026                });
 27
 028            migrationBuilder.CreateTable(
 029                name: "Phones",
 030                columns: table => new
 031                {
 032                    Id = table.Column<Guid>(type: "uuid", nullable: false),
 033                    ClientId = table.Column<Guid>(type: "uuid", nullable: false),
 034                    Number = table.Column<string>(type: "text", nullable: false),
 035                    Type = table.Column<string>(type: "text", nullable: false)
 036                },
 037                constraints: table =>
 038                {
 039                    table.PrimaryKey("PK_Phones", x => x.Id);
 040                    table.ForeignKey(
 041                        name: "FK_Phones_Clients_ClientId",
 042                        column: x => x.ClientId,
 043                        principalTable: "Clients",
 044                        principalColumn: "Id",
 045                        onDelete: ReferentialAction.Cascade);
 046                });
 47
 048            migrationBuilder.CreateIndex(
 049                name: "IX_Phones_ClientId",
 050                table: "Phones",
 051                column: "ClientId");
 052        }
 53
 54        /// <inheritdoc />
 55        protected override void Down(MigrationBuilder migrationBuilder)
 56        {
 057            migrationBuilder.DropTable(
 058                name: "Phones");
 59
 060            migrationBuilder.DropTable(
 061                name: "Clients");
 062        }
 63    }
 64}

/home/runner/work/ClientManagerDemo/ClientManagerDemo/src/ClientManager/ClientManager.Worker/Migrations/20251029073631_InitialCreate.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using ClientManager.Shared.Data;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
 9
 10#nullable disable
 11
 12namespace ClientManager.Worker.Migrations
 13{
 14    [DbContext(typeof(AppDbContext))]
 15    [Migration("20251029073631_InitialCreate")]
 16    partial class InitialCreate
 17    {
 18        /// <inheritdoc />
 19        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 20        {
 21#pragma warning disable 612, 618
 022            modelBuilder
 023                .HasAnnotation("ProductVersion", "9.0.10")
 024                .HasAnnotation("Relational:MaxIdentifierLength", 63);
 25
 026            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 27
 028            modelBuilder.Entity("ClientManager.Shared.Models.Client", b =>
 029                {
 030                    b.Property<Guid>("Id")
 031                        .ValueGeneratedOnAdd()
 032                        .HasColumnType("uuid");
 033
 034                    b.Property<string>("Email")
 035                        .HasColumnType("text");
 036
 037                    b.Property<string>("FirstName")
 038                        .IsRequired()
 039                        .HasMaxLength(100)
 040                        .HasColumnType("character varying(100)");
 041
 042                    b.Property<string>("LastName")
 043                        .IsRequired()
 044                        .HasMaxLength(100)
 045                        .HasColumnType("character varying(100)");
 046
 047                    b.HasKey("Id");
 048
 049                    b.ToTable("Clients");
 050                });
 51
 052            modelBuilder.Entity("ClientManager.Shared.Models.Phone", b =>
 053                {
 054                    b.Property<Guid>("Id")
 055                        .ValueGeneratedOnAdd()
 056                        .HasColumnType("uuid");
 057
 058                    b.Property<Guid>("ClientId")
 059                        .HasColumnType("uuid");
 060
 061                    b.Property<string>("Number")
 062                        .IsRequired()
 063                        .HasColumnType("text");
 064
 065                    b.Property<string>("Type")
 066                        .IsRequired()
 067                        .HasColumnType("text");
 068
 069                    b.HasKey("Id");
 070
 071                    b.HasIndex("ClientId");
 072
 073                    b.ToTable("Phones");
 074                });
 75
 076            modelBuilder.Entity("ClientManager.Shared.Models.Phone", b =>
 077                {
 078                    b.HasOne("ClientManager.Shared.Models.Client", "Client")
 079                        .WithMany("Phones")
 080                        .HasForeignKey("ClientId")
 081                        .OnDelete(DeleteBehavior.Cascade)
 082                        .IsRequired();
 083
 084                    b.Navigation("Client");
 085                });
 86
 087            modelBuilder.Entity("ClientManager.Shared.Models.Client", b =>
 088                {
 089                    b.Navigation("Phones");
 090                });
 91#pragma warning restore 612, 618
 092        }
 93    }
 94}