Files
parr_api/PARR.DAL/Migrations/20230919234848_TblHostsFixRElToTemplate.cs
Mikhail Trubnikov e10b591c1b fix Hosts
2023-09-20 09:52:51 +10:00

50 lines
1.3 KiB
C#

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");
}
}
}