Napol
This commit is contained in:
2226
EveryThing/Migrations/20230523103144_2.Designer.cs
generated
Normal file
2226
EveryThing/Migrations/20230523103144_2.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
57
EveryThing/Migrations/20230523103144_2.cs
Normal file
57
EveryThing/Migrations/20230523103144_2.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _2 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Type",
|
||||
table: "CodeTablePrePostText");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CodeTablePrePostTextLink",
|
||||
columns: table => new
|
||||
{
|
||||
IdPrePostTextLink = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
IdPrePostTextFk = table.Column<int>(type: "int", nullable: false),
|
||||
Type = table.Column<int>(type: "int", nullable: false),
|
||||
Link = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CodeTablePrePostTextLink", x => x.IdPrePostTextLink);
|
||||
table.ForeignKey(
|
||||
name: "FK_CodeTablePrePostTextLink_CodeTablePrePostText_IdPrePostTextFk",
|
||||
column: x => x.IdPrePostTextFk,
|
||||
principalTable: "CodeTablePrePostText",
|
||||
principalColumn: "IdPrePostText",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CodeTablePrePostTextLink_IdPrePostTextFk",
|
||||
table: "CodeTablePrePostTextLink",
|
||||
column: "IdPrePostTextFk");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CodeTablePrePostTextLink");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Type",
|
||||
table: "CodeTablePrePostText",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -393,10 +393,6 @@ namespace EveryThing.Migrations
|
||||
b.Property<int>("IdCompanyFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdPrePostText");
|
||||
|
||||
b.HasIndex("IdCompanyFk");
|
||||
@@ -404,6 +400,28 @@ namespace EveryThing.Migrations
|
||||
b.ToTable("CodeTablePrePostText");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.CodeTable.CodeTablePrePostTextLink", b =>
|
||||
{
|
||||
b.Property<int>("IdPrePostTextLink")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdPrePostTextFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Link")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdPrePostTextLink");
|
||||
|
||||
b.HasIndex("IdPrePostTextFk");
|
||||
|
||||
b.ToTable("CodeTablePrePostTextLink");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Document", b =>
|
||||
{
|
||||
b.Property<int>("IdDocument")
|
||||
@@ -1582,6 +1600,17 @@ namespace EveryThing.Migrations
|
||||
b.Navigation("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.CodeTable.CodeTablePrePostTextLink", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTablePrePostText", "CodeTablePrePostText")
|
||||
.WithMany("CodeTablePrePostTextLinks")
|
||||
.HasForeignKey("IdPrePostTextFk")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CodeTablePrePostText");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Document", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.DocumentType", "DocumentType")
|
||||
@@ -2124,6 +2153,11 @@ namespace EveryThing.Migrations
|
||||
b.Navigation("PartnerTransportLoadingOrderUnload");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.CodeTable.CodeTablePrePostText", b =>
|
||||
{
|
||||
b.Navigation("CodeTablePrePostTextLinks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.DocumentType", b =>
|
||||
{
|
||||
b.Navigation("DocumentTypeDocument");
|
||||
|
||||
Reference in New Issue
Block a user