Napol
This commit is contained in:
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user