This commit is contained in:
2026-01-19 18:02:55 +01:00
parent 87044adcb0
commit 30f87f26da
19 changed files with 10631 additions and 3773 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EveryThing.Migrations
{
public partial class _16 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "IdProjectFk",
table: "Invoices",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "ProjectIdProject",
table: "Invoices",
type: "int",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Invoices_ProjectIdProject",
table: "Invoices",
column: "ProjectIdProject");
migrationBuilder.AddForeignKey(
name: "FK_Invoices_Projects_ProjectIdProject",
table: "Invoices",
column: "ProjectIdProject",
principalTable: "Projects",
principalColumn: "IdProject",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Invoices_Projects_ProjectIdProject",
table: "Invoices");
migrationBuilder.DropIndex(
name: "IX_Invoices_ProjectIdProject",
table: "Invoices");
migrationBuilder.DropColumn(
name: "IdProjectFk",
table: "Invoices");
migrationBuilder.DropColumn(
name: "ProjectIdProject",
table: "Invoices");
}
}
}

View File

@@ -695,6 +695,9 @@ namespace EveryThing.Migrations
.IsRequired()
.HasColumnType("int");
b.Property<int?>("IdProjectFk")
.HasColumnType("int");
b.Property<int>("InvoiceNumber")
.HasColumnType("int");
@@ -710,6 +713,9 @@ namespace EveryThing.Migrations
b.Property<string>("PreText")
.HasColumnType("longtext");
b.Property<int?>("ProjectIdProject")
.HasColumnType("int");
b.Property<int>("State")
.HasColumnType("int");
@@ -722,6 +728,8 @@ namespace EveryThing.Migrations
b.HasIndex("IdPartnerFk");
b.HasIndex("ProjectIdProject");
b.ToTable("Invoices");
});
@@ -1813,9 +1821,16 @@ namespace EveryThing.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("EveryThing.Models.Project.Project", "Project")
.WithMany("Invoices")
.HasForeignKey("ProjectIdProject")
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("Company");
b.Navigation("Partner");
b.Navigation("Project");
});
modelBuilder.Entity("EveryThing.Models.Invoice.InvoiceItem", b =>
@@ -2366,6 +2381,8 @@ namespace EveryThing.Migrations
modelBuilder.Entity("EveryThing.Models.Project.Project", b =>
{
b.Navigation("Invoices");
b.Navigation("ProjectProjectPart");
});