47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace PARR.DAL.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class tblHostsEkIsUnique : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Hosts_Ek_IP",
|
|
table: "Hosts");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Hosts_Ek",
|
|
table: "Hosts",
|
|
column: "Ek",
|
|
unique: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Hosts_IP",
|
|
table: "Hosts",
|
|
column: "IP");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Hosts_Ek",
|
|
table: "Hosts");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Hosts_IP",
|
|
table: "Hosts");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Hosts_Ek_IP",
|
|
table: "Hosts",
|
|
columns: new[] { "Ek", "IP" });
|
|
}
|
|
}
|
|
}
|