using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SushiBarDatabaseImplement.Migrations
{
    /// <inheritdoc />
    public partial class SecondMigration : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateIndex(
                name: "IX_Orders_SushiId",
                table: "Orders",
                column: "SushiId");

            migrationBuilder.AddForeignKey(
                name: "FK_Orders_ListSushi_SushiId",
                table: "Orders",
                column: "SushiId",
                principalTable: "ListSushi",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }

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

            migrationBuilder.DropIndex(
                name: "IX_Orders_SushiId",
                table: "Orders");
        }
    }
}