using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PARR.DAL.Migrations
{
    /// <inheritdoc />
    public partial class tblGroupTypesAddRelationshipsSettings : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<bool>(
                name: "IsRelationshipsAllowed",
                schema: "jobGroup",
                table: "GroupTypes",
                type: "boolean",
                nullable: false,
                defaultValue: false,
                comment: "Разрешена настройка кол-ва связей");

            migrationBuilder.UpdateData(
                schema: "jobGroup",
                table: "GroupTypes",
                keyColumn: "Id",
                keyValue: new Guid("318625e5-f833-436a-99df-2a382a1e71c7"),
                column: "IsRelationshipsAllowed",
                value: true);

            migrationBuilder.UpdateData(
                schema: "jobGroup",
                table: "GroupTypes",
                keyColumn: "Id",
                keyValue: new Guid("4fa62e79-86bb-47c2-be1a-72a716a170fa"),
                column: "IsRelationshipsAllowed",
                value: false);

            migrationBuilder.UpdateData(
                schema: "jobGroup",
                table: "GroupTypes",
                keyColumn: "Id",
                keyValue: new Guid("6ec58b1a-5c40-47b9-b036-4fa490e8d503"),
                column: "IsRelationshipsAllowed",
                value: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "IsRelationshipsAllowed",
                schema: "jobGroup",
                table: "GroupTypes");
        }
    }
}
