Prima aggiunta migrazione

This commit is contained in:
Samuele Locatelli
2026-01-16 14:52:51 +01:00
parent a43ccd0abf
commit 612bd2f4f9
4 changed files with 4233 additions and 95 deletions
+4 -1
View File
@@ -139,12 +139,15 @@ namespace EgwCoreLib.Lux.Data
relationship.DeleteBehavior = DeleteBehavior.Restrict;
}
// fix key relazioni Tags
// fix key multiple
modelBuilder.Entity<JobTaskTagModel>()
.HasKey(jtt => new { jtt.JobID, jtt.CodTag });
modelBuilder.Entity<JobStepTagModel>()
.HasKey(jst => new { jst.JobStepID, jst.CodTag });
modelBuilder.Entity<ProductionItem2ODLModel>()
.HasKey(x => new { x.ProdItemID, x.ProdODLID });
// gestione dati DTX calcolati nel DB
#if false
modelBuilder.Entity<ProductionItemModel>()
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,218 @@
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Reflection;
#nullable disable
namespace EgwCoreLib.Lux.Data.Migrations
{
/// <inheritdoc />
public partial class AddBatchOdl : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
// aggiunta stored
addStored(migrationBuilder, "stp_counterGetNext");
migrationBuilder.DropTable(
name: "production_item_step");
migrationBuilder.AddColumn<string>(
name: "BatchTag",
table: "production_batch",
type: "longtext",
nullable: false)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "production_odl",
columns: table => new
{
ProdODLID = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
OdlTag = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ProdBatchID = table.Column<int>(type: "int", nullable: false),
Index = table.Column<int>(type: "int", nullable: false),
PhaseID = table.Column<int>(type: "int", nullable: true),
ResourceID = table.Column<int>(type: "int", nullable: true),
ProdPlantCod = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Qty = table.Column<double>(type: "double", nullable: false),
DateStart = table.Column<DateTime>(type: "datetime(6)", nullable: true),
DateEnd = table.Column<DateTime>(type: "datetime(6)", nullable: true),
EstimTime = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
WorkTime = table.Column<decimal>(type: "decimal(65,30)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_production_odl", x => x.ProdODLID);
table.ForeignKey(
name: "FK_production_odl_cost_resource_ResourceID",
column: x => x.ResourceID,
principalTable: "cost_resource",
principalColumn: "ResourceID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_production_odl_production_batch_ProdBatchID",
column: x => x.ProdBatchID,
principalTable: "production_batch",
principalColumn: "ProdBatchID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_production_odl_task_phase_PhaseID",
column: x => x.PhaseID,
principalTable: "task_phase",
principalColumn: "PhaseID",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "production_item2odl",
columns: table => new
{
ProdItemID = table.Column<int>(type: "int", nullable: false),
ProdODLID = table.Column<int>(type: "int", nullable: false),
DtAssign = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_production_item2odl", x => new { x.ProdItemID, x.ProdODLID });
table.ForeignKey(
name: "FK_production_item2odl_production_item_ProdItemID",
column: x => x.ProdItemID,
principalTable: "production_item",
principalColumn: "ProdItemID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_production_item2odl_production_odl_ProdODLID",
column: x => x.ProdODLID,
principalTable: "production_odl",
principalColumn: "ProdODLID",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_production_item2odl_ProdODLID",
table: "production_item2odl",
column: "ProdODLID");
migrationBuilder.CreateIndex(
name: "IX_production_odl_PhaseID",
table: "production_odl",
column: "PhaseID");
migrationBuilder.CreateIndex(
name: "IX_production_odl_ProdBatchID",
table: "production_odl",
column: "ProdBatchID");
migrationBuilder.CreateIndex(
name: "IX_production_odl_ResourceID",
table: "production_odl",
column: "ResourceID");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
// rimozione stored
remStored(migrationBuilder, "stp_counterGetNext");
migrationBuilder.DropTable(
name: "production_item2odl");
migrationBuilder.DropTable(
name: "production_odl");
migrationBuilder.DropColumn(
name: "BatchTag",
table: "production_batch");
migrationBuilder.CreateTable(
name: "production_item_step",
columns: table => new
{
ProdItemStepID = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
PhaseID = table.Column<int>(type: "int", nullable: false),
ProdItemID = table.Column<int>(type: "int", nullable: false),
ResourceID = table.Column<int>(type: "int", nullable: false),
DateEnd = table.Column<DateTime>(type: "datetime(6)", nullable: true),
DateStart = table.Column<DateTime>(type: "datetime(6)", nullable: true),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Index = table.Column<int>(type: "int", nullable: false),
Qty = table.Column<double>(type: "double", nullable: false),
WorkTime = table.Column<double>(type: "double", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_production_item_step", x => x.ProdItemStepID);
table.ForeignKey(
name: "FK_production_item_step_cost_resource_ResourceID",
column: x => x.ResourceID,
principalTable: "cost_resource",
principalColumn: "ResourceID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_production_item_step_production_item_ProdItemID",
column: x => x.ProdItemID,
principalTable: "production_item",
principalColumn: "ProdItemID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_production_item_step_task_phase_PhaseID",
column: x => x.PhaseID,
principalTable: "task_phase",
principalColumn: "PhaseID",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_production_item_step_PhaseID",
table: "production_item_step",
column: "PhaseID");
migrationBuilder.CreateIndex(
name: "IX_production_item_step_ProdItemID",
table: "production_item_step",
column: "ProdItemID");
migrationBuilder.CreateIndex(
name: "IX_production_item_step_ResourceID",
table: "production_item_step",
column: "ResourceID");
}
private void addView(MigrationBuilder migrationBuilder, string objName)
{
string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "SqlScripts", "View", $"{objName}.sql");
string viewBody = File.ReadAllText(path);
migrationBuilder.Sql(viewBody);
}
private void addStored(MigrationBuilder migrationBuilder, string objName)
{
string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "SqlScripts", "Stored", $"{objName}.sql");
string viewBody = File.ReadAllText(path);
migrationBuilder.Sql(viewBody);
}
private void remView(MigrationBuilder migrationBuilder, string objName)
{
migrationBuilder.Sql($"DROP VIEW IF EXISTS {objName};");
}
private void remStored(MigrationBuilder migrationBuilder, string objName)
{
migrationBuilder.Sql($"DROP PROCEDURE IF EXISTS {objName};");
}
}
}
@@ -1047,6 +1047,10 @@ namespace EgwCoreLib.Lux.Data.Migrations
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ProdBatchID"));
b.Property<string>("BatchTag")
.IsRequired()
.HasColumnType("longtext");
b.Property<DateTime?>("DateEnd")
.HasColumnType("datetime(6)");
@@ -1090,6 +1094,24 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.ToTable("production_group");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItem2ODLModel", b =>
{
b.Property<int>("ProdItemID")
.HasColumnType("int");
b.Property<int>("ProdODLID")
.HasColumnType("int");
b.Property<DateTime>("DtAssign")
.HasColumnType("datetime(6)");
b.HasKey("ProdItemID", "ProdODLID");
b.HasIndex("ProdODLID");
b.ToTable("production_item2odl");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b =>
{
b.Property<int>("ProdItemID")
@@ -1108,40 +1130,40 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Property<int>("ItemCode")
.HasColumnType("int");
b.Property<string>("ItemTag")
.HasColumnType("varchar(255)");
b.Property<int>("OrderRowID")
.HasColumnType("int");
b.Property<int?>("ProdBatchID")
.HasColumnType("int");
b.Property<int?>("ProdGroupID")
.HasColumnType("int");
b.Property<string>("ItemTag")
.HasColumnType("varchar(255)");
b.Property<int?>("ProdBatchID")
.HasColumnType("int");
b.HasKey("ProdItemID");
b.HasIndex("OrderRowID");
b.HasIndex("ProdGroupID");
b.HasIndex("ItemTag")
.IsUnique()
.HasDatabaseName("idx_prod_item_tag");
b.HasIndex("OrderRowID");
b.HasIndex("ProdBatchID");
b.HasIndex("ProdGroupID");
b.ToTable("production_item");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b =>
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionODLModel", b =>
{
b.Property<int>("ProdItemStepID")
b.Property<int>("ProdODLID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ProdItemStepID"));
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ProdODLID"));
b.Property<DateTime?>("DateEnd")
.HasColumnType("datetime(6)");
@@ -1153,33 +1175,44 @@ namespace EgwCoreLib.Lux.Data.Migrations
.IsRequired()
.HasColumnType("longtext");
b.Property<decimal>("EstimTime")
.HasColumnType("decimal(65,30)");
b.Property<int>("Index")
.HasColumnType("int");
b.Property<int>("PhaseID")
b.Property<string>("OdlTag")
.IsRequired()
.HasColumnType("longtext");
b.Property<int?>("PhaseID")
.HasColumnType("int");
b.Property<int>("ProdItemID")
b.Property<int>("ProdBatchID")
.HasColumnType("int");
b.Property<string>("ProdPlantCod")
.IsRequired()
.HasColumnType("longtext");
b.Property<double>("Qty")
.HasColumnType("double");
b.Property<int>("ResourceID")
b.Property<int?>("ResourceID")
.HasColumnType("int");
b.Property<double>("WorkTime")
.HasColumnType("double");
b.Property<decimal>("WorkTime")
.HasColumnType("decimal(65,30)");
b.HasKey("ProdItemStepID");
b.HasKey("ProdODLID");
b.HasIndex("PhaseID");
b.HasIndex("ProdItemID");
b.HasIndex("ProdBatchID");
b.HasIndex("ResourceID");
b.ToTable("production_item_step");
b.ToTable("production_odl");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionPlantModel", b =>
@@ -1403,16 +1436,16 @@ namespace EgwCoreLib.Lux.Data.Migrations
Description = "Offerta per tre serramenti",
DictPresel = "",
Discount = 0.0,
DueDateProm = new DateTime(2026, 3, 15, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 13, 0, 0, 0, 0, DateTimeKind.Local),
DueDateProm = new DateTime(2026, 3, 17, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 15, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 1,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8384),
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8385),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1119),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1120),
OffertState = 0,
RefNum = 1,
RefRev = 1,
RefYear = 2025,
ValidUntil = new DateTime(2026, 2, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8380)
ValidUntil = new DateTime(2026, 2, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1115)
},
new
{
@@ -1423,16 +1456,16 @@ namespace EgwCoreLib.Lux.Data.Migrations
Description = "Offerta BEAM",
DictPresel = "",
Discount = 0.0,
DueDateProm = new DateTime(2026, 3, 15, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 13, 0, 0, 0, 0, DateTimeKind.Local),
DueDateProm = new DateTime(2026, 3, 17, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 15, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 2,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8397),
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8399),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1134),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1136),
OffertState = 0,
RefNum = 2,
RefRev = 1,
RefYear = 2025,
ValidUntil = new DateTime(2026, 2, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8396)
ValidUntil = new DateTime(2026, 2, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1133)
},
new
{
@@ -1443,16 +1476,16 @@ namespace EgwCoreLib.Lux.Data.Migrations
Description = "Offerta Cabinet",
DictPresel = "",
Discount = 0.0,
DueDateProm = new DateTime(2026, 3, 15, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 13, 0, 0, 0, 0, DateTimeKind.Local),
DueDateProm = new DateTime(2026, 3, 17, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 15, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 4,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8407),
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8408),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1144),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1145),
OffertState = 0,
RefNum = 3,
RefRev = 1,
RefYear = 2025,
ValidUntil = new DateTime(2026, 2, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8405)
ValidUntil = new DateTime(2026, 2, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1142)
},
new
{
@@ -1463,16 +1496,16 @@ namespace EgwCoreLib.Lux.Data.Migrations
Description = "Offerta Wall",
DictPresel = "",
Discount = 0.0,
DueDateProm = new DateTime(2026, 3, 15, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 13, 0, 0, 0, 0, DateTimeKind.Local),
DueDateProm = new DateTime(2026, 3, 17, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 15, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 3,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8416),
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8417),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1153),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1154),
OffertState = 0,
RefNum = 4,
RefRev = 1,
RefYear = 2025,
ValidUntil = new DateTime(2026, 2, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8414)
ValidUntil = new DateTime(2026, 2, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1152)
});
});
@@ -1601,14 +1634,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8535),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1281),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8537),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1283),
Note = "Finestra Anta Singola 2025",
OfferID = 1,
OfferRowUID = "SOR.26.00000002",
@@ -1634,14 +1667,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8549),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1295),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8550),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1297),
Note = "Finestra Vetro Fisso 2025",
OfferID = 1,
OfferRowUID = "SOR.26.00000001",
@@ -1667,14 +1700,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8561),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1307),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8562),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1309),
Note = "Persiana per Finestra anta singola 2025",
OfferID = 1,
OfferRowUID = "SOR.26.00000003",
@@ -1700,14 +1733,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8573),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1319),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8575),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1321),
Note = "Installazione serramento",
OfferID = 1,
OfferRowUID = "SOR.26.00000004",
@@ -1733,14 +1766,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8606),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1351),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8608),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1353),
Note = "Demo file 01",
OfferID = 2,
OfferRowUID = "SOR.26.00000005",
@@ -1766,14 +1799,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8618),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1363),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8620),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1365),
Note = "Demo file 02",
OfferID = 2,
OfferRowUID = "SOR.26.00000006",
@@ -1799,14 +1832,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8648),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1405),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8650),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1407),
Note = "Demo file 01",
OfferID = 3,
OfferRowUID = "SOR.26.00000007",
@@ -1832,14 +1865,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8660),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1417),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8662),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1419),
Note = "Demo file 02",
OfferID = 3,
OfferRowUID = "SOR.26.00000008",
@@ -1865,14 +1898,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8690),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1446),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8691),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1447),
Note = "Demo file 01",
OfferID = 4,
OfferRowUID = "SOR.26.00000009",
@@ -1898,14 +1931,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8702),
Inserted = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1458),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 14, 11, 52, 54, 702, DateTimeKind.Local).AddTicks(8704),
Modified = new DateTime(2026, 1, 16, 14, 47, 28, 394, DateTimeKind.Local).AddTicks(1460),
Note = "Demo file 02",
OfferID = 4,
OfferRowUID = "SOR.26.0000000A",
@@ -2251,8 +2284,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 1,
CodDoc = "",
DtCreate = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3814),
DtMod = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3861),
DtCreate = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4098),
DtMod = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4147),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 5.0,
@@ -2264,8 +2297,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 2,
CodDoc = "",
DtCreate = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3864),
DtMod = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3866),
DtCreate = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4150),
DtMod = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4152),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 8.0,
@@ -2277,8 +2310,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 3,
CodDoc = "",
DtCreate = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3868),
DtMod = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3869),
DtCreate = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4154),
DtMod = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4155),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 5.0,
@@ -2290,8 +2323,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 4,
CodDoc = "",
DtCreate = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3871),
DtMod = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3873),
DtCreate = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4157),
DtMod = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4158),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -2303,8 +2336,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 5,
CodDoc = "",
DtCreate = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3875),
DtMod = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3876),
DtCreate = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4160),
DtMod = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4162),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 10.0,
@@ -2316,8 +2349,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 6,
CodDoc = "",
DtCreate = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3878),
DtMod = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3880),
DtCreate = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4164),
DtMod = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4165),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -2329,8 +2362,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 7,
CodDoc = "",
DtCreate = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3882),
DtMod = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3883),
DtCreate = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4167),
DtMod = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4169),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 50.0,
@@ -2342,8 +2375,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 8,
CodDoc = "",
DtCreate = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3885),
DtMod = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3886),
DtCreate = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4171),
DtMod = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4172),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -2355,8 +2388,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 9,
CodDoc = "",
DtCreate = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3888),
DtMod = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3890),
DtCreate = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4174),
DtMod = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4175),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -2368,8 +2401,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 10,
CodDoc = "",
DtCreate = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3892),
DtMod = new DateTime(2026, 1, 14, 11, 52, 54, 699, DateTimeKind.Local).AddTicks(3893),
DtCreate = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4177),
DtMod = new DateTime(2026, 1, 16, 14, 47, 28, 390, DateTimeKind.Local).AddTicks(4179),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -3431,6 +3464,25 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Navigation("OrderRowNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItem2ODLModel", b =>
{
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProductionItemNav")
.WithMany("Item2OdlNav")
.HasForeignKey("ProdItemID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionODLModel", "ProductionODLNav")
.WithMany("Item2OdlNav")
.HasForeignKey("ProdODLID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("ProductionItemNav");
b.Navigation("ProductionODLNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b =>
{
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav")
@@ -3439,16 +3491,16 @@ namespace EgwCoreLib.Lux.Data.Migrations
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionGroupModel", "ProductionGroupNav")
.WithMany("ItemsNav")
.HasForeignKey("ProdGroupID")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav")
.WithMany()
.HasForeignKey("ProdBatchID")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionGroupModel", "ProductionGroupNav")
.WithMany("ItemsNav")
.HasForeignKey("ProdGroupID")
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("OrderRowNav");
b.Navigation("ProductionBatchNav");
@@ -3456,29 +3508,27 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Navigation("ProductionGroupNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b =>
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionODLModel", b =>
{
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav")
.WithMany()
.HasForeignKey("PhaseID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav")
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProdBatchNav")
.WithMany()
.HasForeignKey("ProdItemID")
.HasForeignKey("ProdBatchID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav")
.WithMany()
.HasForeignKey("ResourceID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("PhaseNav");
b.Navigation("ProdItemNav");
b.Navigation("ProdBatchNav");
b.Navigation("ResourceNav");
});
@@ -3750,6 +3800,16 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Navigation("ItemsNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b =>
{
b.Navigation("Item2OdlNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionODLModel", b =>
{
b.Navigation("Item2OdlNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b =>
{
b.Navigation("OfferRowNav");