using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PARR.DAL.Migrations
{
    /// <inheritdoc />
    public partial class tblUnitRegionalEkPtkGroup : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "RegionalEkPtkGroups",
                schema: "unit",
                columns: table => new
                {
                    FieldValueId = table.Column<Guid>(type: "uuid", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RegionalEkPtkGroups", x => x.FieldValueId);
                    table.ForeignKey(
                        name: "FK_RegionalEkPtkGroups_FieldValues_FieldValueId",
                        column: x => x.FieldValueId,
                        principalSchema: "unit",
                        principalTable: "FieldValues",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "Таблица - региональные группы ПТК");
        }

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