|
|
|
@ -0,0 +1,321 @@
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
|
|
|
|
|
|
|
|
namespace EntityFramwork.Migrations
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
public partial class testModel : Migration
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
|
|
|
name: "FK_EntityCategorieRune_EntityPageRune_IdPageRune",
|
|
|
|
|
table: "EntityCategorieRune");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
|
|
|
name: "FK_EntityCategorieRune_Runes_IdRune",
|
|
|
|
|
table: "EntityCategorieRune");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropPrimaryKey(
|
|
|
|
|
name: "PK_EntityPageRune",
|
|
|
|
|
table: "EntityPageRune");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropPrimaryKey(
|
|
|
|
|
name: "PK_EntityCategorieRune",
|
|
|
|
|
table: "EntityCategorieRune");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.RenameTable(
|
|
|
|
|
name: "EntityPageRune",
|
|
|
|
|
newName: "PageRunes");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.RenameTable(
|
|
|
|
|
name: "EntityCategorieRune",
|
|
|
|
|
newName: "CategorieRunes");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.RenameIndex(
|
|
|
|
|
name: "IX_EntityCategorieRune_IdRune",
|
|
|
|
|
table: "CategorieRunes",
|
|
|
|
|
newName: "IX_CategorieRunes_IdRune");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.RenameIndex(
|
|
|
|
|
name: "IX_EntityCategorieRune_IdPageRune",
|
|
|
|
|
table: "CategorieRunes",
|
|
|
|
|
newName: "IX_CategorieRunes_IdPageRune");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddPrimaryKey(
|
|
|
|
|
name: "PK_PageRunes",
|
|
|
|
|
table: "PageRunes",
|
|
|
|
|
column: "Id");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddPrimaryKey(
|
|
|
|
|
name: "PK_CategorieRunes",
|
|
|
|
|
table: "CategorieRunes",
|
|
|
|
|
column: "Id");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.InsertData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
columns: new[] { "Id", "Base64" },
|
|
|
|
|
values: new object[,]
|
|
|
|
|
{
|
|
|
|
|
{ 1, "Inconnu !" },
|
|
|
|
|
{ 2, "Inconnu !" },
|
|
|
|
|
{ 3, "Inconnu !" },
|
|
|
|
|
{ 4, "Inconnu !" },
|
|
|
|
|
{ 5, "Inconnu !" },
|
|
|
|
|
{ 6, "Inconnu !" },
|
|
|
|
|
{ 7, "Inconnu !" },
|
|
|
|
|
{ 8, "Inconnu !" },
|
|
|
|
|
{ 9, "Inconnu !" },
|
|
|
|
|
{ 10, "Inconnu !" },
|
|
|
|
|
{ 11, "Inconnu !" },
|
|
|
|
|
{ 12, "Inconnu !" },
|
|
|
|
|
{ 13, "Inconnu !" },
|
|
|
|
|
{ 14, "Inconnu !" },
|
|
|
|
|
{ 15, "Inconnu !" },
|
|
|
|
|
{ 16, "Inconnu !" },
|
|
|
|
|
{ 17, "Inconnu !" },
|
|
|
|
|
{ 18, "Inconnu !" },
|
|
|
|
|
{ 19, "Inconnu !" },
|
|
|
|
|
{ 20, "Inconnu !" },
|
|
|
|
|
{ 21, "Inconnu !" },
|
|
|
|
|
{ 22, "Inconnu !" },
|
|
|
|
|
{ 23, "Inconnu !" },
|
|
|
|
|
{ 24, "Inconnu !" },
|
|
|
|
|
{ 25, "Inconnu !" },
|
|
|
|
|
{ 26, "Inconnu !" },
|
|
|
|
|
{ 27, "Inconnu !" },
|
|
|
|
|
{ 28, "Inconnu !" },
|
|
|
|
|
{ 29, "Inconnu !" }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
|
|
|
name: "FK_CategorieRunes_PageRunes_IdPageRune",
|
|
|
|
|
table: "CategorieRunes",
|
|
|
|
|
column: "IdPageRune",
|
|
|
|
|
principalTable: "PageRunes",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
|
|
|
name: "FK_CategorieRunes_Runes_IdRune",
|
|
|
|
|
table: "CategorieRunes",
|
|
|
|
|
column: "IdRune",
|
|
|
|
|
principalTable: "Runes",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
|
|
|
name: "FK_CategorieRunes_PageRunes_IdPageRune",
|
|
|
|
|
table: "CategorieRunes");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
|
|
|
name: "FK_CategorieRunes_Runes_IdRune",
|
|
|
|
|
table: "CategorieRunes");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropPrimaryKey(
|
|
|
|
|
name: "PK_PageRunes",
|
|
|
|
|
table: "PageRunes");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropPrimaryKey(
|
|
|
|
|
name: "PK_CategorieRunes",
|
|
|
|
|
table: "CategorieRunes");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 1);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 2);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 3);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 4);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 5);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 6);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 7);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 8);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 9);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 10);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 11);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 12);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 13);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 14);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 15);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 16);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 17);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 18);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 19);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 20);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 21);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 22);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 23);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 24);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 25);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 26);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 27);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 28);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "Images",
|
|
|
|
|
keyColumn: "Id",
|
|
|
|
|
keyValue: 29);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.RenameTable(
|
|
|
|
|
name: "PageRunes",
|
|
|
|
|
newName: "EntityPageRune");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.RenameTable(
|
|
|
|
|
name: "CategorieRunes",
|
|
|
|
|
newName: "EntityCategorieRune");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.RenameIndex(
|
|
|
|
|
name: "IX_CategorieRunes_IdRune",
|
|
|
|
|
table: "EntityCategorieRune",
|
|
|
|
|
newName: "IX_EntityCategorieRune_IdRune");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.RenameIndex(
|
|
|
|
|
name: "IX_CategorieRunes_IdPageRune",
|
|
|
|
|
table: "EntityCategorieRune",
|
|
|
|
|
newName: "IX_EntityCategorieRune_IdPageRune");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddPrimaryKey(
|
|
|
|
|
name: "PK_EntityPageRune",
|
|
|
|
|
table: "EntityPageRune",
|
|
|
|
|
column: "Id");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddPrimaryKey(
|
|
|
|
|
name: "PK_EntityCategorieRune",
|
|
|
|
|
table: "EntityCategorieRune",
|
|
|
|
|
column: "Id");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
|
|
|
name: "FK_EntityCategorieRune_EntityPageRune_IdPageRune",
|
|
|
|
|
table: "EntityCategorieRune",
|
|
|
|
|
column: "IdPageRune",
|
|
|
|
|
principalTable: "EntityPageRune",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
|
|
|
name: "FK_EntityCategorieRune_Runes_IdRune",
|
|
|
|
|
table: "EntityCategorieRune",
|
|
|
|
|
column: "IdRune",
|
|
|
|
|
principalTable: "Runes",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|