using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PARR.DAL.Migrations
{
    /// <inheritdoc />
    public partial class tblKiiUnits : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "KiiUnits",
                schema: "unit",
                columns: table => new
                {
                    UnitId = table.Column<Guid>(type: "uuid", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_KiiUnits", x => x.UnitId);
                    table.ForeignKey(
                        name: "FK_KiiUnits_Units_UnitId",
                        column: x => x.UnitId,
                        principalSchema: "unit",
                        principalTable: "Units",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "Таблица - Список ЭК КИИ, которые учавствуют в групповых работах. Создавалась как временная");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "KiiUnits",
                schema: "unit");
        }
    }
}
