using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Modules.Library.Database.Migrations
{
    /// <inheritdoc />
    public partial class M001 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_Anime_Episodes_AnimeTitles_AnimeTitleId",
                table: "Anime_Episodes");

            migrationBuilder.DropForeignKey(
                name: "FK_Anime_Episodes_Anime_Seasons_AnimeSeasonId",
                table: "Anime_Episodes");

            migrationBuilder.DropForeignKey(
                name: "FK_Anime_Seasons_AnimeTitles_AnimeTitleId",
                table: "Anime_Seasons");

            migrationBuilder.DropForeignKey(
                name: "FK_AnimeItem_AnimeTitles_AnimeTitleId",
                table: "AnimeItem");

            migrationBuilder.DropForeignKey(
                name: "FK_CommonProperties_AnimeTitles_AnimeTitleId",
                table: "CommonProperties");

            migrationBuilder.AddForeignKey(
                name: "FK_Anime_Episodes_AnimeTitles_AnimeTitleId",
                table: "Anime_Episodes",
                column: "AnimeTitleId",
                principalTable: "AnimeTitles",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);

            migrationBuilder.AddForeignKey(
                name: "FK_Anime_Episodes_Anime_Seasons_AnimeSeasonId",
                table: "Anime_Episodes",
                column: "AnimeSeasonId",
                principalTable: "Anime_Seasons",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);

            migrationBuilder.AddForeignKey(
                name: "FK_Anime_Seasons_AnimeTitles_AnimeTitleId",
                table: "Anime_Seasons",
                column: "AnimeTitleId",
                principalTable: "AnimeTitles",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);

            migrationBuilder.AddForeignKey(
                name: "FK_AnimeItem_AnimeTitles_AnimeTitleId",
                table: "AnimeItem",
                column: "AnimeTitleId",
                principalTable: "AnimeTitles",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);

            migrationBuilder.AddForeignKey(
                name: "FK_CommonProperties_AnimeTitles_AnimeTitleId",
                table: "CommonProperties",
                column: "AnimeTitleId",
                principalTable: "AnimeTitles",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_Anime_Episodes_AnimeTitles_AnimeTitleId",
                table: "Anime_Episodes");

            migrationBuilder.DropForeignKey(
                name: "FK_Anime_Episodes_Anime_Seasons_AnimeSeasonId",
                table: "Anime_Episodes");

            migrationBuilder.DropForeignKey(
                name: "FK_Anime_Seasons_AnimeTitles_AnimeTitleId",
                table: "Anime_Seasons");

            migrationBuilder.DropForeignKey(
                name: "FK_AnimeItem_AnimeTitles_AnimeTitleId",
                table: "AnimeItem");

            migrationBuilder.DropForeignKey(
                name: "FK_CommonProperties_AnimeTitles_AnimeTitleId",
                table: "CommonProperties");

            migrationBuilder.AddForeignKey(
                name: "FK_Anime_Episodes_AnimeTitles_AnimeTitleId",
                table: "Anime_Episodes",
                column: "AnimeTitleId",
                principalTable: "AnimeTitles",
                principalColumn: "Id");

            migrationBuilder.AddForeignKey(
                name: "FK_Anime_Episodes_Anime_Seasons_AnimeSeasonId",
                table: "Anime_Episodes",
                column: "AnimeSeasonId",
                principalTable: "Anime_Seasons",
                principalColumn: "Id");

            migrationBuilder.AddForeignKey(
                name: "FK_Anime_Seasons_AnimeTitles_AnimeTitleId",
                table: "Anime_Seasons",
                column: "AnimeTitleId",
                principalTable: "AnimeTitles",
                principalColumn: "Id");

            migrationBuilder.AddForeignKey(
                name: "FK_AnimeItem_AnimeTitles_AnimeTitleId",
                table: "AnimeItem",
                column: "AnimeTitleId",
                principalTable: "AnimeTitles",
                principalColumn: "Id");

            migrationBuilder.AddForeignKey(
                name: "FK_CommonProperties_AnimeTitles_AnimeTitleId",
                table: "CommonProperties",
                column: "AnimeTitleId",
                principalTable: "AnimeTitles",
                principalColumn: "Id");
        }
    }
}
