using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DiunaBI.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class TypeO : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_Layers_Layers_parentId",
                table: "Layers");

            migrationBuilder.RenameColumn(
                name: "parentId",
                table: "Layers",
                newName: "ParentId");

            migrationBuilder.RenameIndex(
                name: "IX_Layers_parentId",
                table: "Layers",
                newName: "IX_Layers_ParentId");

            migrationBuilder.AddForeignKey(
                name: "FK_Layers_Layers_ParentId",
                table: "Layers",
                column: "ParentId",
                principalTable: "Layers",
                principalColumn: "Id");
        }

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

            migrationBuilder.RenameColumn(
                name: "ParentId",
                table: "Layers",
                newName: "parentId");

            migrationBuilder.RenameIndex(
                name: "IX_Layers_ParentId",
                table: "Layers",
                newName: "IX_Layers_parentId");

            migrationBuilder.AddForeignKey(
                name: "FK_Layers_Layers_parentId",
                table: "Layers",
                column: "parentId",
                principalTable: "Layers",
                principalColumn: "Id");
        }
    }
}
