using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PARR.DAL.Migrations
{
    /// <inheritdoc />
    public partial class TblHostsFixRElToTemplate : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_Hosts_Hosts_HostId",
                table: "Hosts");

            migrationBuilder.DropIndex(
                name: "IX_Hosts_HostId",
                table: "Hosts");

            migrationBuilder.DropColumn(
                name: "HostId",
                table: "Hosts");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "HostId",
                table: "Hosts",
                type: "uuid",
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_Hosts_HostId",
                table: "Hosts",
                column: "HostId");

            migrationBuilder.AddForeignKey(
                name: "FK_Hosts_Hosts_HostId",
                table: "Hosts",
                column: "HostId",
                principalTable: "Hosts",
                principalColumn: "Id");
        }
    }
}
