using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TravelCompanyDatabaseImplement.Migrations
{
    /// <inheritdoc />
    public partial class test : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_TourTravels_Tours_TravelId",
                table: "TourTravels");

            migrationBuilder.CreateIndex(
                name: "IX_TourTravels_TourId",
                table: "TourTravels",
                column: "TourId");

            migrationBuilder.AddForeignKey(
                name: "FK_TourTravels_Tours_TourId",
                table: "TourTravels",
                column: "TourId",
                principalTable: "Tours",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }

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

            migrationBuilder.DropIndex(
                name: "IX_TourTravels_TourId",
                table: "TourTravels");

            migrationBuilder.AddForeignKey(
                name: "FK_TourTravels_Tours_TravelId",
                table: "TourTravels",
                column: "TravelId",
                principalTable: "Tours",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }
    }
}
