|
|
@ -12,7 +12,7 @@ namespace EFlib.Migrations
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
name: "EFLargeImage",
|
|
|
|
name: "LargeImages",
|
|
|
|
columns: table => new
|
|
|
|
columns: table => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
|
|
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
|
@ -20,7 +20,7 @@ namespace EFlib.Migrations
|
|
|
|
},
|
|
|
|
},
|
|
|
|
constraints: table =>
|
|
|
|
constraints: table =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
table.PrimaryKey("PK_EFLargeImage", x => x.Id);
|
|
|
|
table.PrimaryKey("PK_LargeImages", x => x.Id);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
@ -37,15 +37,15 @@ namespace EFlib.Migrations
|
|
|
|
{
|
|
|
|
{
|
|
|
|
table.PrimaryKey("PK_Champions", x => x.Name);
|
|
|
|
table.PrimaryKey("PK_Champions", x => x.Name);
|
|
|
|
table.ForeignKey(
|
|
|
|
table.ForeignKey(
|
|
|
|
name: "FK_Champions_EFLargeImage_ImageId",
|
|
|
|
name: "FK_Champions_LargeImages_ImageId",
|
|
|
|
column: x => x.ImageId,
|
|
|
|
column: x => x.ImageId,
|
|
|
|
principalTable: "EFLargeImage",
|
|
|
|
principalTable: "LargeImages",
|
|
|
|
principalColumn: "Id",
|
|
|
|
principalColumn: "Id",
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
name: "EFCharacteristics",
|
|
|
|
name: "Characteristics",
|
|
|
|
columns: table => new
|
|
|
|
columns: table => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name = table.Column<string>(type: "TEXT", maxLength: 250, nullable: false),
|
|
|
|
Name = table.Column<string>(type: "TEXT", maxLength: 250, nullable: false),
|
|
|
@ -54,9 +54,9 @@ namespace EFlib.Migrations
|
|
|
|
},
|
|
|
|
},
|
|
|
|
constraints: table =>
|
|
|
|
constraints: table =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
table.PrimaryKey("PK_EFCharacteristics", x => x.Name);
|
|
|
|
table.PrimaryKey("PK_Characteristics", x => x.Name);
|
|
|
|
table.ForeignKey(
|
|
|
|
table.ForeignKey(
|
|
|
|
name: "FK_EFCharacteristics_Champions_NameChampion",
|
|
|
|
name: "FK_Characteristics_Champions_NameChampion",
|
|
|
|
column: x => x.NameChampion,
|
|
|
|
column: x => x.NameChampion,
|
|
|
|
principalTable: "Champions",
|
|
|
|
principalTable: "Champions",
|
|
|
|
principalColumn: "Name",
|
|
|
|
principalColumn: "Name",
|
|
|
@ -103,9 +103,9 @@ namespace EFlib.Migrations
|
|
|
|
principalColumn: "Name",
|
|
|
|
principalColumn: "Name",
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
table.ForeignKey(
|
|
|
|
table.ForeignKey(
|
|
|
|
name: "FK_Skins_EFLargeImage_ImageId",
|
|
|
|
name: "FK_Skins_LargeImages_ImageId",
|
|
|
|
column: x => x.ImageId,
|
|
|
|
column: x => x.ImageId,
|
|
|
|
principalTable: "EFLargeImage",
|
|
|
|
principalTable: "LargeImages",
|
|
|
|
principalColumn: "Id",
|
|
|
|
principalColumn: "Id",
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -116,8 +116,8 @@ namespace EFlib.Migrations
|
|
|
|
column: "ImageId");
|
|
|
|
column: "ImageId");
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
name: "IX_EFCharacteristics_NameChampion",
|
|
|
|
name: "IX_Characteristics_NameChampion",
|
|
|
|
table: "EFCharacteristics",
|
|
|
|
table: "Characteristics",
|
|
|
|
column: "NameChampion");
|
|
|
|
column: "NameChampion");
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
@ -140,7 +140,7 @@ namespace EFlib.Migrations
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
name: "EFCharacteristics");
|
|
|
|
name: "Characteristics");
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
name: "Skills");
|
|
|
|
name: "Skills");
|
|
|
@ -152,7 +152,7 @@ namespace EFlib.Migrations
|
|
|
|
name: "Champions");
|
|
|
|
name: "Champions");
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
name: "EFLargeImage");
|
|
|
|
name: "LargeImages");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|