using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

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

            migrationBuilder.AddForeignKey(
                name: "FK_Places_Excursions_ExcursionId",
                table: "Places",
                column: "ExcursionId",
                principalTable: "Excursions",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }

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

            migrationBuilder.AddForeignKey(
                name: "FK_Places_Excursions_ExcursionId",
                table: "Places",
                column: "ExcursionId",
                principalTable: "Excursions",
                principalColumn: "Id");
        }
    }
}
