Recreate consolidation of migrations after fixes.
This commit is contained in:
parent
4d486114cb
commit
b56a19d8b8
490
EntityFrameworkCore.Data/Migrations/20250407095737_AddRelationshipConstraints.Designer.cs
generated
Normal file
490
EntityFrameworkCore.Data/Migrations/20250407095737_AddRelationshipConstraints.Designer.cs
generated
Normal file
@ -0,0 +1,490 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using EntityFrameworkCore.Data;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace EntityFrameworkCore.Data.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(DeadBallZoneLeagueDbContext))]
|
||||||
|
[Migration("20250407095737_AddRelationshipConstraints")]
|
||||||
|
partial class AddRelationshipConstraints
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder.HasAnnotation("ProductVersion", "9.0.3");
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Coach", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("CreatedBy")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedDate")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("ModifiedBy")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<DateTime>("ModifiedDate")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Coaches");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 1,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Christian Southgate"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 2,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Rob Mann"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 3,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Jon Curtis"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 4,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Andy Taylor"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 5,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Steve Johnson"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 6,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Dan Cook"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 7,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Ken Jarvis"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 8,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Kenny Suzuki"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 9,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Gordon Hall"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 10,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "John O Dowd"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 11,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Julian Widdows"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 12,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Andy Williams"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 13,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Trevor Williams"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 14,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Blake Deathray"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 15,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Rock Housebrick"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.League", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("CreatedBy")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedDate")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("ModifiedBy")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<DateTime>("ModifiedDate")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Leagues");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 1,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 6, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Local League"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 2,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 6, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "National League"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 3,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 6, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Geosphere"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 4,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 6, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Cyber war"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Match", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("AwayTeamId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("AwayTeamScore")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("CreatedBy")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedDate")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<DateTime>("Date")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<int>("HomeTeamId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("HomeTeamScore")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("ModifiedBy")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<DateTime>("ModifiedDate")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<decimal>("TicketPrice")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("AwayTeamId");
|
||||||
|
|
||||||
|
b.HasIndex("HomeTeamId");
|
||||||
|
|
||||||
|
b.ToTable("Matches");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("CoachId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("CreatedBy")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedDate")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<int?>("LeagueId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("ModifiedBy")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<DateTime>("ModifiedDate")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CoachId")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
|
b.HasIndex("LeagueId");
|
||||||
|
|
||||||
|
b.HasIndex("Name")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
|
b.ToTable("Teams");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 1,
|
||||||
|
CoachId = 1,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 2,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Neo Delhi"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 2,
|
||||||
|
CoachId = 2,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 1,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Voodoo"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 3,
|
||||||
|
CoachId = 3,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 1,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Penal X"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 4,
|
||||||
|
CoachId = 4,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 3,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Neo Tokyo"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 5,
|
||||||
|
CoachId = 5,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 2,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Neo Barcelona"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 6,
|
||||||
|
CoachId = 6,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 2,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Neo Manchester"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 7,
|
||||||
|
CoachId = 7,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 3,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Neo Bangkok"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 8,
|
||||||
|
CoachId = 8,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 3,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Neo Amsterdam"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 9,
|
||||||
|
CoachId = 9,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 1,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Killaklowns"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 10,
|
||||||
|
CoachId = 10,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 1,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Sol"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 11,
|
||||||
|
CoachId = 11,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 4,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "DEC"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 12,
|
||||||
|
CoachId = 12,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 1,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Leopards"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 13,
|
||||||
|
CoachId = 13,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 1,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Harlequins"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 14,
|
||||||
|
CoachId = 14,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 4,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Gladiators"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 15,
|
||||||
|
CoachId = 15,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
LeagueId = 1,
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Fiz-O"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Match", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("EntityFrameworkCore.Domain.Team", "AwayTeam")
|
||||||
|
.WithMany("AwayMatches")
|
||||||
|
.HasForeignKey("AwayTeamId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("EntityFrameworkCore.Domain.Team", "HomeTeam")
|
||||||
|
.WithMany("HomeMatches")
|
||||||
|
.HasForeignKey("HomeTeamId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("AwayTeam");
|
||||||
|
|
||||||
|
b.Navigation("HomeTeam");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("EntityFrameworkCore.Domain.Coach", "Coach")
|
||||||
|
.WithOne("Team")
|
||||||
|
.HasForeignKey("EntityFrameworkCore.Domain.Team", "CoachId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("EntityFrameworkCore.Domain.League", "League")
|
||||||
|
.WithMany("Teams")
|
||||||
|
.HasForeignKey("LeagueId");
|
||||||
|
|
||||||
|
b.Navigation("Coach");
|
||||||
|
|
||||||
|
b.Navigation("League");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Coach", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Team");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.League", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Teams");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("AwayMatches");
|
||||||
|
|
||||||
|
b.Navigation("HomeMatches");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,472 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||||
|
|
||||||
|
namespace EntityFrameworkCore.Data.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddRelationshipConstraints : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "TeamId",
|
||||||
|
table: "Coaches");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "LeagueId",
|
||||||
|
table: "Teams",
|
||||||
|
type: "INTEGER",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "INTEGER");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "AwayTeamScore",
|
||||||
|
table: "Matches",
|
||||||
|
type: "INTEGER",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "HomeTeamScore",
|
||||||
|
table: "Matches",
|
||||||
|
type: "INTEGER",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "Coaches",
|
||||||
|
columns: new[] { "Id", "CreatedBy", "CreatedDate", "ModifiedBy", "ModifiedDate", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ 1, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Christian Southgate" },
|
||||||
|
{ 2, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Rob Mann" },
|
||||||
|
{ 3, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Jon Curtis" },
|
||||||
|
{ 4, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Andy Taylor" },
|
||||||
|
{ 5, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Steve Johnson" },
|
||||||
|
{ 6, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Dan Cook" },
|
||||||
|
{ 7, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Ken Jarvis" },
|
||||||
|
{ 8, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Kenny Suzuki" },
|
||||||
|
{ 9, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Gordon Hall" },
|
||||||
|
{ 10, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "John O Dowd" },
|
||||||
|
{ 11, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Julian Widdows" },
|
||||||
|
{ 12, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Andy Williams" },
|
||||||
|
{ 13, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Trevor Williams" },
|
||||||
|
{ 14, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Blake Deathray" },
|
||||||
|
{ 15, null, new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Rock Housebrick" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 1,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 1, 2 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 2,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 2, 1 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 3,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 3, 1 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 4,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 4, 3 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 5,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 5, 2 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 6,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 6, 2 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 7,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 7, 3 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 8,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 8, 3 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 9,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 9, 1 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 10,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 10, 1 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 11,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 11, 4 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 12,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 12, 1 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 13,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 13, 1 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 14,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 14, 4 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 15,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 15, 1 });
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Teams_CoachId",
|
||||||
|
table: "Teams",
|
||||||
|
column: "CoachId",
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Teams_LeagueId",
|
||||||
|
table: "Teams",
|
||||||
|
column: "LeagueId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Teams_Name",
|
||||||
|
table: "Teams",
|
||||||
|
column: "Name",
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Matches_AwayTeamId",
|
||||||
|
table: "Matches",
|
||||||
|
column: "AwayTeamId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Matches_HomeTeamId",
|
||||||
|
table: "Matches",
|
||||||
|
column: "HomeTeamId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Matches_Teams_AwayTeamId",
|
||||||
|
table: "Matches",
|
||||||
|
column: "AwayTeamId",
|
||||||
|
principalTable: "Teams",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Matches_Teams_HomeTeamId",
|
||||||
|
table: "Matches",
|
||||||
|
column: "HomeTeamId",
|
||||||
|
principalTable: "Teams",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Teams_Coaches_CoachId",
|
||||||
|
table: "Teams",
|
||||||
|
column: "CoachId",
|
||||||
|
principalTable: "Coaches",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Teams_Leagues_LeagueId",
|
||||||
|
table: "Teams",
|
||||||
|
column: "LeagueId",
|
||||||
|
principalTable: "Leagues",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Matches_Teams_AwayTeamId",
|
||||||
|
table: "Matches");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Matches_Teams_HomeTeamId",
|
||||||
|
table: "Matches");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Teams_Coaches_CoachId",
|
||||||
|
table: "Teams");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Teams_Leagues_LeagueId",
|
||||||
|
table: "Teams");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Teams_CoachId",
|
||||||
|
table: "Teams");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Teams_LeagueId",
|
||||||
|
table: "Teams");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Teams_Name",
|
||||||
|
table: "Teams");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Matches_AwayTeamId",
|
||||||
|
table: "Matches");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Matches_HomeTeamId",
|
||||||
|
table: "Matches");
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 1);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 2);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 3);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 4);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 5);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 6);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 7);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 8);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 9);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 10);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 11);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 12);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 13);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 14);
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Coaches",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 15);
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "AwayTeamScore",
|
||||||
|
table: "Matches");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "HomeTeamScore",
|
||||||
|
table: "Matches");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "LeagueId",
|
||||||
|
table: "Teams",
|
||||||
|
type: "INTEGER",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0,
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "INTEGER",
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "TeamId",
|
||||||
|
table: "Coaches",
|
||||||
|
type: "INTEGER",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 1,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 2,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 3,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 4,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 5,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 6,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 7,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 8,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 9,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 10,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 11,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 12,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 13,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 14,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Teams",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: 15,
|
||||||
|
columns: new[] { "CoachId", "LeagueId" },
|
||||||
|
values: new object[] { 0, 0 });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -39,12 +39,116 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<int?>("TeamId")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("Coaches", (string)null);
|
b.ToTable("Coaches");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 1,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Christian Southgate"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 2,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Rob Mann"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 3,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Jon Curtis"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 4,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Andy Taylor"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 5,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Steve Johnson"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 6,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Dan Cook"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 7,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Ken Jarvis"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 8,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Kenny Suzuki"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 9,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Gordon Hall"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 10,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "John O Dowd"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 11,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Julian Widdows"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 12,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Andy Williams"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 13,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Trevor Williams"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 14,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Blake Deathray"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 15,
|
||||||
|
CreatedDate = new DateTime(2025, 4, 7, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Name = "Rock Housebrick"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("EntityFrameworkCore.Domain.League", b =>
|
modelBuilder.Entity("EntityFrameworkCore.Domain.League", b =>
|
||||||
@ -70,7 +174,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("Leagues", (string)null);
|
b.ToTable("Leagues");
|
||||||
|
|
||||||
b.HasData(
|
b.HasData(
|
||||||
new
|
new
|
||||||
@ -112,6 +216,9 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
b.Property<int>("AwayTeamId")
|
b.Property<int>("AwayTeamId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("AwayTeamScore")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
b.Property<string>("CreatedBy")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
@ -124,6 +231,9 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
b.Property<int>("HomeTeamId")
|
b.Property<int>("HomeTeamId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("HomeTeamScore")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<string>("ModifiedBy")
|
b.Property<string>("ModifiedBy")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
@ -135,7 +245,11 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("Matches", (string)null);
|
b.HasIndex("AwayTeamId");
|
||||||
|
|
||||||
|
b.HasIndex("HomeTeamId");
|
||||||
|
|
||||||
|
b.ToTable("Matches");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
|
||||||
@ -153,7 +267,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
b.Property<DateTime>("CreatedDate")
|
b.Property<DateTime>("CreatedDate")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<int>("LeagueId")
|
b.Property<int?>("LeagueId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<string>("ModifiedBy")
|
b.Property<string>("ModifiedBy")
|
||||||
@ -167,145 +281,206 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("Teams", (string)null);
|
b.HasIndex("CoachId")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
|
b.HasIndex("LeagueId");
|
||||||
|
|
||||||
|
b.HasIndex("Name")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
|
b.ToTable("Teams");
|
||||||
|
|
||||||
b.HasData(
|
b.HasData(
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 1,
|
Id = 1,
|
||||||
CoachId = 0,
|
CoachId = 1,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 2,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Neo Delhi"
|
Name = "Neo Delhi"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 2,
|
Id = 2,
|
||||||
CoachId = 0,
|
CoachId = 2,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 1,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Voodoo"
|
Name = "Voodoo"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 3,
|
Id = 3,
|
||||||
CoachId = 0,
|
CoachId = 3,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 1,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Penal X"
|
Name = "Penal X"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 4,
|
Id = 4,
|
||||||
CoachId = 0,
|
CoachId = 4,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 3,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Neo Tokyo"
|
Name = "Neo Tokyo"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 5,
|
Id = 5,
|
||||||
CoachId = 0,
|
CoachId = 5,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 2,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Neo Barcelona"
|
Name = "Neo Barcelona"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 6,
|
Id = 6,
|
||||||
CoachId = 0,
|
CoachId = 6,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 2,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Neo Manchester"
|
Name = "Neo Manchester"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 7,
|
Id = 7,
|
||||||
CoachId = 0,
|
CoachId = 7,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 3,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Neo Bangkok"
|
Name = "Neo Bangkok"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 8,
|
Id = 8,
|
||||||
CoachId = 0,
|
CoachId = 8,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 3,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Neo Amsterdam"
|
Name = "Neo Amsterdam"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 9,
|
Id = 9,
|
||||||
CoachId = 0,
|
CoachId = 9,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 1,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Killaklowns"
|
Name = "Killaklowns"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 10,
|
Id = 10,
|
||||||
CoachId = 0,
|
CoachId = 10,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 1,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Sol"
|
Name = "Sol"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 11,
|
Id = 11,
|
||||||
CoachId = 0,
|
CoachId = 11,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 4,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "DEC"
|
Name = "DEC"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 12,
|
Id = 12,
|
||||||
CoachId = 0,
|
CoachId = 12,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 1,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Leopards"
|
Name = "Leopards"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 13,
|
Id = 13,
|
||||||
CoachId = 0,
|
CoachId = 13,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 1,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Harlequins"
|
Name = "Harlequins"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 14,
|
Id = 14,
|
||||||
CoachId = 0,
|
CoachId = 14,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 4,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Gladiators"
|
Name = "Gladiators"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 15,
|
Id = 15,
|
||||||
CoachId = 0,
|
CoachId = 15,
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
||||||
LeagueId = 0,
|
LeagueId = 1,
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
Name = "Fiz-O"
|
Name = "Fiz-O"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Match", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("EntityFrameworkCore.Domain.Team", "AwayTeam")
|
||||||
|
.WithMany("AwayMatches")
|
||||||
|
.HasForeignKey("AwayTeamId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("EntityFrameworkCore.Domain.Team", "HomeTeam")
|
||||||
|
.WithMany("HomeMatches")
|
||||||
|
.HasForeignKey("HomeTeamId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("AwayTeam");
|
||||||
|
|
||||||
|
b.Navigation("HomeTeam");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("EntityFrameworkCore.Domain.Coach", "Coach")
|
||||||
|
.WithOne("Team")
|
||||||
|
.HasForeignKey("EntityFrameworkCore.Domain.Team", "CoachId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("EntityFrameworkCore.Domain.League", "League")
|
||||||
|
.WithMany("Teams")
|
||||||
|
.HasForeignKey("LeagueId");
|
||||||
|
|
||||||
|
b.Navigation("Coach");
|
||||||
|
|
||||||
|
b.Navigation("League");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Coach", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Team");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.League", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Teams");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("AwayMatches");
|
||||||
|
|
||||||
|
b.Navigation("HomeMatches");
|
||||||
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user