Remove consolidated migration.
dotnet ef migrations remove --startup-project ./ --project ../EntityFrameworkCore.Data
This commit is contained in:
parent
150f500675
commit
8229e74c13
@ -1,368 +0,0 @@
|
|||||||
// <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("20250407093150_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");
|
|
||||||
});
|
|
||||||
|
|
||||||
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 = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Neo Delhi"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Voodoo"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 3,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Penal X"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 4,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Neo Tokyo"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 5,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Neo Barcelona"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 6,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Neo Manchester"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 7,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Neo Bangkok"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 8,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Neo Amsterdam"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 9,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Killaklowns"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 10,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Sol"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 11,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "DEC"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 12,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Leopards"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 13,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Harlequins"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 14,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Name = "Gladiators"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 15,
|
|
||||||
CoachId = 0,
|
|
||||||
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,372 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
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.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 1,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 2,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 3,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 4,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 5,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 6,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 7,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 8,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 9,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 10,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 11,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 12,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 13,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 14,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 15,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
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.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,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 2,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 3,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 4,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 5,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 6,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 7,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 8,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 9,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 10,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 11,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 12,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 13,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 14,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Teams",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 15,
|
|
||||||
column: "LeagueId",
|
|
||||||
value: 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -39,9 +39,12 @@ 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");
|
b.ToTable("Coaches", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("EntityFrameworkCore.Domain.League", b =>
|
modelBuilder.Entity("EntityFrameworkCore.Domain.League", b =>
|
||||||
@ -67,7 +70,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("Leagues");
|
b.ToTable("Leagues", (string)null);
|
||||||
|
|
||||||
b.HasData(
|
b.HasData(
|
||||||
new
|
new
|
||||||
@ -109,9 +112,6 @@ 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,9 +124,6 @@ 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");
|
||||||
|
|
||||||
@ -138,11 +135,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("AwayTeamId");
|
b.ToTable("Matches", (string)null);
|
||||||
|
|
||||||
b.HasIndex("HomeTeamId");
|
|
||||||
|
|
||||||
b.ToTable("Matches");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
|
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
|
||||||
@ -160,7 +153,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")
|
||||||
@ -174,15 +167,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("CoachId")
|
b.ToTable("Teams", (string)null);
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.HasIndex("LeagueId");
|
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("Teams");
|
|
||||||
|
|
||||||
b.HasData(
|
b.HasData(
|
||||||
new
|
new
|
||||||
@ -190,6 +175,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 1,
|
Id = 1,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -198,6 +184,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 2,
|
Id = 2,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -206,6 +193,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 3,
|
Id = 3,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -214,6 +202,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 4,
|
Id = 4,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -222,6 +211,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 5,
|
Id = 5,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -230,6 +220,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 6,
|
Id = 6,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -238,6 +229,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 7,
|
Id = 7,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -246,6 +238,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 8,
|
Id = 8,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -254,6 +247,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 9,
|
Id = 9,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -262,6 +256,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 10,
|
Id = 10,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -270,6 +265,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 11,
|
Id = 11,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -278,6 +274,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 12,
|
Id = 12,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -286,6 +283,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 13,
|
Id = 13,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -294,6 +292,7 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 14,
|
Id = 14,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@ -302,63 +301,11 @@ namespace EntityFrameworkCore.Data.Migrations
|
|||||||
Id = 15,
|
Id = 15,
|
||||||
CoachId = 0,
|
CoachId = 0,
|
||||||
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,
|
||||||
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