Pulizia migration, update readme
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="DTO\" />
|
||||
<Folder Include="Migrations\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -47,8 +47,10 @@ namespace MagMan.Data.Tenant
|
||||
public virtual DbSet<RequestDetailModel> DbSetReqDet{ get; set; } = null!;
|
||||
|
||||
|
||||
public virtual DbSet<MovMagModel> DbSetMovMag { get; set; } = null!;
|
||||
public virtual DbSet<PrintJobQueueModel> DbSetPrintJob { get; set; } = null!;
|
||||
#if false
|
||||
public virtual DbSet<MovMagModel> DbSetMovMag { get; set; } = null!;
|
||||
public virtual DbSet<PrintJobQueueModel> DbSetPrintJob { get; set; } = null!;
|
||||
#endif
|
||||
|
||||
|
||||
private string connString = "";
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
// <auto-generated />
|
||||
using MagMan.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MagMan.Data.Tenant.Migrations
|
||||
{
|
||||
[DbContext(typeof(MagManContext))]
|
||||
[Migration("20231222163946_InitDb")]
|
||||
partial class InitDb
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.25")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("Note")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.Property<string>("Val")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("ValStd")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Valore di default/riferimento per la variabile");
|
||||
|
||||
b.HasKey("KeyName");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MagMan.Data.Tenant.Migrations
|
||||
{
|
||||
public partial class InitDb : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterDatabase()
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Config",
|
||||
columns: table => new
|
||||
{
|
||||
KeyName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Val = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ValStd = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "Valore di default/riferimento per la variabile")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Note = table.Column<string>(type: "varchar(250)", maxLength: 250, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Config", x => x.KeyName);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Config");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,149 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using MagMan.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MagMan.Data.Tenant.Migrations
|
||||
{
|
||||
[DbContext(typeof(MagManContext))]
|
||||
[Migration("20231222180319_AddMagBaseObj")]
|
||||
partial class AddMagBaseObj
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.25")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("Note")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.Property<string>("Val")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("ValStd")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Valore di default/riferimento per la variabile");
|
||||
|
||||
b.HasKey("KeyName");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.ItemModel", b =>
|
||||
{
|
||||
b.Property<int>("RawItemId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<bool>("IsRemn")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<decimal>("LMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<string>("Location")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("MatId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("QtyAvail")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("HMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<decimal>("WMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.HasKey("RawItemId");
|
||||
|
||||
b.HasIndex("MatId");
|
||||
|
||||
b.ToTable("ItemsList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.MaterialModel", b =>
|
||||
{
|
||||
b.Property<int>("MatId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("ApprovDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("ApprovUser")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<decimal>("LMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<string>("MatDesc")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("MatExtCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("HMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<decimal>("WMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.HasKey("MatId");
|
||||
|
||||
b.ToTable("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.ItemModel", b =>
|
||||
{
|
||||
b.HasOne("MagMan.Data.DbModels.MaterialModel", "MaterialNav")
|
||||
.WithMany("RawItemList")
|
||||
.HasForeignKey("MatId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("MaterialNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.MaterialModel", b =>
|
||||
{
|
||||
b.Navigation("RawItemList");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MagMan.Data.Tenant.Migrations
|
||||
{
|
||||
public partial class AddMagBaseObj : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Materials",
|
||||
columns: table => new
|
||||
{
|
||||
MatID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
MatExtCode = table.Column<int>(type: "int", nullable: false),
|
||||
MatDesc = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ApprovDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
ApprovUser = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
WMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
TMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Materials", x => x.MatID);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ItemsList",
|
||||
columns: table => new
|
||||
{
|
||||
ItemID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
MatID = table.Column<int>(type: "int", nullable: false),
|
||||
IsRemn = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
Location = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
QtyAvail = table.Column<int>(type: "int", nullable: false),
|
||||
DtMod = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
LMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
WMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
TMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
Note = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ItemsList", x => x.ItemID);
|
||||
table.ForeignKey(
|
||||
name: "FK_ItemsList_Materials_MatID",
|
||||
column: x => x.MatID,
|
||||
principalTable: "Materials",
|
||||
principalColumn: "MatId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ItemsList_MatID",
|
||||
table: "ItemsList",
|
||||
column: "MatId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ItemsList");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Materials");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,221 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using MagMan.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MagMan.Data.Tenant.Migrations
|
||||
{
|
||||
[DbContext(typeof(MagManContext))]
|
||||
[Migration("20231222180523_AddMagBaseObj01")]
|
||||
partial class AddMagBaseObj01
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.25")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("Note")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.Property<string>("Val")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("ValStd")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Valore di default/riferimento per la variabile");
|
||||
|
||||
b.HasKey("KeyName");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.ItemModel", b =>
|
||||
{
|
||||
b.Property<int>("RawItemId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<bool>("IsRemn")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<decimal>("LMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<string>("Location")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("MatId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("QtyAvail")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("HMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<decimal>("WMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.HasKey("RawItemId");
|
||||
|
||||
b.HasIndex("MatId");
|
||||
|
||||
b.ToTable("ItemsList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.MaterialModel", b =>
|
||||
{
|
||||
b.Property<int>("MatId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("ApprovDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("ApprovUser")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<decimal>("LMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<string>("MatDesc")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("MatExtCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("HMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<decimal>("WMm")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.HasKey("MatId");
|
||||
|
||||
b.ToTable("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.MovMagModel", b =>
|
||||
{
|
||||
b.Property<int>("MovID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtRec")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("RawItemId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("QtyRec")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("MovID");
|
||||
|
||||
b.HasIndex("RawItemId");
|
||||
|
||||
b.ToTable("MovMag");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.PrintJobQueueModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxPrintJob")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtEnd")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime?>("DtLastTry")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtStart")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("KeyParam")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("PrtName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("Stato")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TipoReport")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdxPrintJob");
|
||||
|
||||
b.ToTable("PrintJobQueue");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.ItemModel", b =>
|
||||
{
|
||||
b.HasOne("MagMan.Data.DbModels.MaterialModel", "MaterialNav")
|
||||
.WithMany("RawItemList")
|
||||
.HasForeignKey("MatId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("MaterialNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.MovMagModel", b =>
|
||||
{
|
||||
b.HasOne("MagMan.Data.DbModels.ItemModel", "ITemNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RawItemId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ITemNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.DbModels.MaterialModel", b =>
|
||||
{
|
||||
b.Navigation("RawItemList");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MagMan.Data.Tenant.Migrations
|
||||
{
|
||||
public partial class AddMagBaseObj01 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MovMag",
|
||||
columns: table => new
|
||||
{
|
||||
MovID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DtRec = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
ItemID = table.Column<int>(type: "int", nullable: false),
|
||||
QtyRec = table.Column<int>(type: "int", nullable: false),
|
||||
UserId = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MovMag", x => x.MovID);
|
||||
table.ForeignKey(
|
||||
name: "FK_MovMag_ItemsList_ItemID",
|
||||
column: x => x.ItemID,
|
||||
principalTable: "ItemsList",
|
||||
principalColumn: "RawItemId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PrintJobQueue",
|
||||
columns: table => new
|
||||
{
|
||||
IdxPrintJob = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
TipoReport = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
KeyParam = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
PrtName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
DtStart = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
DtEnd = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
Stato = table.Column<int>(type: "int", nullable: false),
|
||||
DtLastTry = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PrintJobQueue", x => x.IdxPrintJob);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MovMag_ItemID",
|
||||
table: "MovMag",
|
||||
column: "RawItemId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "MovMag");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PrintJobQueue");
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-76
@@ -11,8 +11,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace MagMan.Data.Tenant.Migrations
|
||||
{
|
||||
[DbContext(typeof(MagManContext))]
|
||||
[Migration("20240118161406_AddRequestAndFixMag01")]
|
||||
partial class AddRequestAndFixMag01
|
||||
[Migration("20240118161646_InitDb")]
|
||||
partial class InitDb
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -97,70 +97,6 @@ namespace MagMan.Data.Tenant.Migrations
|
||||
b.ToTable("MaterialsList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.Tenant.DbModels.MovMagModel", b =>
|
||||
{
|
||||
b.Property<int>("MovID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtRec")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("ItemID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("QtyRec")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("RawItemId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("MovID");
|
||||
|
||||
b.HasIndex("RawItemId");
|
||||
|
||||
b.ToTable("MovMag");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.Tenant.DbModels.PrintJobQueueModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxPrintJob")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtEnd")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime?>("DtLastTry")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtStart")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("KeyParam")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("PrtName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("Stato")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TipoReport")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdxPrintJob");
|
||||
|
||||
b.ToTable("PrintJobQueue");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.Tenant.DbModels.RawItemModel", b =>
|
||||
{
|
||||
b.Property<int>("RawItemId")
|
||||
@@ -243,16 +179,6 @@ namespace MagMan.Data.Tenant.Migrations
|
||||
b.ToTable("RequestPlan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.Tenant.DbModels.MovMagModel", b =>
|
||||
{
|
||||
b.HasOne("MagMan.Data.Tenant.DbModels.RawItemModel", "ITemNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RawItemId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.Navigation("ITemNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.Tenant.DbModels.RawItemModel", b =>
|
||||
{
|
||||
b.HasOne("MagMan.Data.Tenant.DbModels.MaterialModel", "MaterialNav")
|
||||
+25
-116
@@ -6,34 +6,12 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace MagMan.Data.Tenant.Migrations
|
||||
{
|
||||
public partial class AddRequestAndFixMag01 : Migration
|
||||
public partial class InitDb : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_MovMag_ItemsList_RawItemId",
|
||||
table: "MovMag");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ItemsList");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Materials");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "RawItemId",
|
||||
table: "MovMag",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ItemID",
|
||||
table: "MovMag",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
migrationBuilder.AlterDatabase()
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AliasList",
|
||||
@@ -52,6 +30,25 @@ namespace MagMan.Data.Tenant.Migrations
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Config",
|
||||
columns: table => new
|
||||
{
|
||||
KeyName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Val = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ValStd = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "Valore di default/riferimento per la variabile")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Note = table.Column<string>(type: "varchar(250)", maxLength: 250, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Config", x => x.KeyName);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MaterialsList",
|
||||
columns: table => new
|
||||
@@ -137,25 +134,16 @@ namespace MagMan.Data.Tenant.Migrations
|
||||
name: "IX_RawItemList_MatId",
|
||||
table: "RawItemList",
|
||||
column: "MatId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MovMag_RawItemList_RawItemId",
|
||||
table: "MovMag",
|
||||
column: "RawItemId",
|
||||
principalTable: "RawItemList",
|
||||
principalColumn: "RawItemId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_MovMag_RawItemList_RawItemId",
|
||||
table: "MovMag");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AliasList");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Config");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RawItemList");
|
||||
|
||||
@@ -167,85 +155,6 @@ namespace MagMan.Data.Tenant.Migrations
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "MaterialsList");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ItemID",
|
||||
table: "MovMag");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "RawItemId",
|
||||
table: "MovMag",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Materials",
|
||||
columns: table => new
|
||||
{
|
||||
MatId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
ApprovDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
ApprovUser = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
HMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
LMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
MatDesc = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
MatExtCode = table.Column<int>(type: "int", nullable: false),
|
||||
WMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Materials", x => x.MatId);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ItemsList",
|
||||
columns: table => new
|
||||
{
|
||||
RawItemId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
MatId = table.Column<int>(type: "int", nullable: false),
|
||||
DtMod = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
HMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
IsRemn = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
LMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
Location = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Note = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
QtyAvail = table.Column<int>(type: "int", nullable: false),
|
||||
WMm = table.Column<decimal>(type: "decimal(65,30)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ItemsList", x => x.RawItemId);
|
||||
table.ForeignKey(
|
||||
name: "FK_ItemsList_Materials_MatId",
|
||||
column: x => x.MatId,
|
||||
principalTable: "Materials",
|
||||
principalColumn: "MatId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ItemsList_MatId",
|
||||
table: "ItemsList",
|
||||
column: "MatId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MovMag_ItemsList_RawItemId",
|
||||
table: "MovMag",
|
||||
column: "RawItemId",
|
||||
principalTable: "ItemsList",
|
||||
principalColumn: "RawItemId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,70 +95,6 @@ namespace MagMan.Data.Tenant.Migrations
|
||||
b.ToTable("MaterialsList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.Tenant.DbModels.MovMagModel", b =>
|
||||
{
|
||||
b.Property<int>("MovID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtRec")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("ItemID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("QtyRec")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("RawItemId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("MovID");
|
||||
|
||||
b.HasIndex("RawItemId");
|
||||
|
||||
b.ToTable("MovMag");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.Tenant.DbModels.PrintJobQueueModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxPrintJob")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtEnd")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime?>("DtLastTry")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtStart")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("KeyParam")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("PrtName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("Stato")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TipoReport")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdxPrintJob");
|
||||
|
||||
b.ToTable("PrintJobQueue");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.Tenant.DbModels.RawItemModel", b =>
|
||||
{
|
||||
b.Property<int>("RawItemId")
|
||||
@@ -241,16 +177,6 @@ namespace MagMan.Data.Tenant.Migrations
|
||||
b.ToTable("RequestPlan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.Tenant.DbModels.MovMagModel", b =>
|
||||
{
|
||||
b.HasOne("MagMan.Data.Tenant.DbModels.RawItemModel", "ITemNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RawItemId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.Navigation("ITemNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MagMan.Data.Tenant.DbModels.RawItemModel", b =>
|
||||
{
|
||||
b.HasOne("MagMan.Data.Tenant.DbModels.MaterialModel", "MaterialNav")
|
||||
|
||||
@@ -135,11 +135,20 @@ Ogni nuovo user dovrà poi essere associato al bucket del cliente tramite un cod
|
||||
|
||||
<div style="page-break-after: always; visibility: hidden"></div>
|
||||
|
||||
## Gestione Sync DB
|
||||
|
||||
E' stato implementato un nuovo set di tabelle sul DB (locale) di EgtBeamWall per gestire materiali e grezzi non tramite file ma tramite DB e così gettare la base per la gestione del sync locale/cloud.
|
||||
|
||||
Nello stesso tempo, il sito web, oltre a proporre pagine utente, implementa web API rest che, tramite apposita libreria di comuncazione SDK (messa sul repo nuget aziendale) permette di comuncare, sincronizzare e gestire i dati.
|
||||
|
||||
<div style="page-break-after: always; visibility: hidden"></div>
|
||||
|
||||
## Revisione documento
|
||||
|
||||
|
||||
Version | Date | Editor | Note
|
||||
:--: |----------|----- | ----:
|
||||
0.5 | 2024.01.18 | S.E. Locatelli | Prime note sync DB online/locale
|
||||
0.3 | 2024.01.10 | S.E. Locatelli | Revisione modalità multi-tenant
|
||||
0.2 | 2024.01.05 | S.E. Locatelli | update ruoli e workflow
|
||||
0.1 | 2023.12.28 | S.E. Locatelli | Prima revisione documento
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user