|
|
|
@ -2,12 +2,10 @@
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
|
|
|
|
|
|
|
|
namespace EntityFramework.Migrations
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
public partial class myMig : Migration
|
|
|
|
|
public partial class manymanymig : Migration
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
@ -39,6 +37,17 @@ namespace EntityFramework.Migrations
|
|
|
|
|
table.PrimaryKey("PK_Image", x => x.Id);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "Rune",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
Name = table.Column<string>(type: "TEXT", nullable: false)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_Rune", x => x.Name);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "SkillEntity",
|
|
|
|
|
columns: table => new
|
|
|
|
@ -79,19 +88,57 @@ namespace EntityFramework.Migrations
|
|
|
|
|
principalColumn: "Name");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.InsertData(
|
|
|
|
|
table: "Champion",
|
|
|
|
|
columns: new[] { "Name", "Bio", "Icon", "Image" },
|
|
|
|
|
values: new object[,]
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "RunePage",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
Name = table.Column<string>(type: "TEXT", nullable: false),
|
|
|
|
|
RuneName = table.Column<string>(type: "TEXT", nullable: true)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_RunePage", x => x.Name);
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_RunePage_Rune_RuneName",
|
|
|
|
|
column: x => x.RuneName,
|
|
|
|
|
principalTable: "Rune",
|
|
|
|
|
principalColumn: "Name");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "ChampionEntityRunePageEntity",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
ChampionName = table.Column<string>(type: "TEXT", nullable: false),
|
|
|
|
|
RunePageEntitiesName = table.Column<string>(type: "TEXT", nullable: false)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
{ "Aatrox", "", "", null },
|
|
|
|
|
{ "Ahri", "", "", null },
|
|
|
|
|
{ "Akali", "", "", null },
|
|
|
|
|
{ "Akshan", "", "", null },
|
|
|
|
|
{ "Alistar", "", "", null },
|
|
|
|
|
{ "Bard", "", "", null }
|
|
|
|
|
table.PrimaryKey("PK_ChampionEntityRunePageEntity", x => new { x.ChampionName, x.RunePageEntitiesName });
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_ChampionEntityRunePageEntity_Champion_ChampionName",
|
|
|
|
|
column: x => x.ChampionName,
|
|
|
|
|
principalTable: "Champion",
|
|
|
|
|
principalColumn: "Name",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_ChampionEntityRunePageEntity_RunePage_RunePageEntitiesName",
|
|
|
|
|
column: x => x.RunePageEntitiesName,
|
|
|
|
|
principalTable: "RunePage",
|
|
|
|
|
principalColumn: "Name",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
name: "IX_ChampionEntityRunePageEntity_RunePageEntitiesName",
|
|
|
|
|
table: "ChampionEntityRunePageEntity",
|
|
|
|
|
column: "RunePageEntitiesName");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
name: "IX_RunePage_RuneName",
|
|
|
|
|
table: "RunePage",
|
|
|
|
|
column: "RuneName");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
name: "IX_SkillEntity_ChampionEntityName",
|
|
|
|
|
table: "SkillEntity",
|
|
|
|
@ -106,6 +153,9 @@ namespace EntityFramework.Migrations
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "ChampionEntityRunePageEntity");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "Image");
|
|
|
|
|
|
|
|
|
@ -115,8 +165,14 @@ namespace EntityFramework.Migrations
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "Skins");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "RunePage");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "Champion");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "Rune");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|