fix Hosts
This commit is contained in:
1445
PARR.DAL/Migrations/20230919234848_TblHostsFixRElToTemplate.Designer.cs
generated
Normal file
1445
PARR.DAL/Migrations/20230919234848_TblHostsFixRElToTemplate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -518,9 +518,6 @@ namespace PARR.DAL.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid?>("HostId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("IP")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
@@ -536,8 +533,6 @@ namespace PARR.DAL.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("HostId");
|
||||
|
||||
b.ToTable("Hosts");
|
||||
});
|
||||
|
||||
@@ -1192,13 +1187,6 @@ namespace PARR.DAL.Migrations
|
||||
b.Navigation("Work");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Host", b =>
|
||||
{
|
||||
b.HasOne("PARR.DAL.Models.Host", null)
|
||||
.WithMany("Hosts")
|
||||
.HasForeignKey("HostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Subprocess", b =>
|
||||
{
|
||||
b.HasOne("PARR.DAL.Models.Process", "Process")
|
||||
@@ -1219,7 +1207,7 @@ namespace PARR.DAL.Migrations
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PARR.DAL.Models.Host", "Host")
|
||||
.WithMany()
|
||||
.WithMany("Templates")
|
||||
.HasForeignKey("HostId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
@@ -1379,7 +1367,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
b.Navigation("ApplicationsInHosts");
|
||||
|
||||
b.Navigation("Hosts");
|
||||
b.Navigation("Templates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Process", b =>
|
||||
|
||||
@@ -30,6 +30,6 @@ namespace PARR.DAL.Models
|
||||
|
||||
public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
|
||||
public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user