fix Hosts

This commit is contained in:
Mikhail Trubnikov
2023-09-20 09:52:51 +10:00
parent 87f81d5ed6
commit e10b591c1b
4 changed files with 1497 additions and 15 deletions

View File

@@ -0,0 +1,49 @@
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");
}
}
}