Create migrations for concurrency tokens.

This commit is contained in:
Kevin Matsubara 2025-04-14 22:11:01 +02:00
parent 2a09ddb0da
commit f02538b281
3 changed files with 965 additions and 34 deletions

View File

@ -0,0 +1,568 @@
// <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("20250414200332_AddConcurrencyCheckVersionToken")]
partial class AddConcurrencyCheckVersionToken
{
/// <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")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<string>("ModifiedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<Guid>("Version")
.IsConcurrencyToken()
.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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
});
});
modelBuilder.Entity("EntityFrameworkCore.Domain.League", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<string>("ModifiedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<Guid>("Version")
.IsConcurrencyToken()
.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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
});
});
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")
.HasMaxLength(100)
.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")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<decimal>("TicketPrice")
.HasPrecision(16, 2)
.HasColumnType("TEXT");
b.Property<Guid>("Version")
.IsConcurrencyToken()
.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")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<int?>("LeagueId")
.HasColumnType("INTEGER");
b.Property<string>("ModifiedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<Guid>("Version")
.IsConcurrencyToken()
.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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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",
Version = new Guid("00000000-0000-0000-0000-000000000000")
});
});
modelBuilder.Entity("EntityFrameworkCore.Domain.TeamsAndLeaguesView", b =>
{
b.Property<string>("LeagueName")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.ToTable((string)null);
b.ToView("vw_TeamsAndLeagues", (string)null);
});
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
}
}
}

View File

@ -0,0 +1,301 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EntityFrameworkCore.Data.Migrations
{
/// <inheritdoc />
public partial class AddConcurrencyCheckVersionToken : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "Version",
table: "Teams",
type: "TEXT",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<Guid>(
name: "Version",
table: "Matches",
type: "TEXT",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<Guid>(
name: "Version",
table: "Leagues",
type: "TEXT",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<Guid>(
name: "Version",
table: "Coaches",
type: "TEXT",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 1,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 2,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 3,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 4,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 5,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 6,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 7,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 8,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 9,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 10,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 11,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 12,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 13,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 14,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Coaches",
keyColumn: "Id",
keyValue: 15,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Leagues",
keyColumn: "Id",
keyValue: 1,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Leagues",
keyColumn: "Id",
keyValue: 2,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Leagues",
keyColumn: "Id",
keyValue: 3,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Leagues",
keyColumn: "Id",
keyValue: 4,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 1,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 2,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 3,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 4,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 5,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 6,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 7,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 8,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 9,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 10,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 11,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 12,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 13,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 14,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.UpdateData(
table: "Teams",
keyColumn: "Id",
keyValue: 15,
column: "Version",
value: new Guid("00000000-0000-0000-0000-000000000000"));
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Version",
table: "Teams");
migrationBuilder.DropColumn(
name: "Version",
table: "Matches");
migrationBuilder.DropColumn(
name: "Version",
table: "Leagues");
migrationBuilder.DropColumn(
name: "Version",
table: "Coaches");
}
}
}

View File

@ -24,12 +24,14 @@ namespace EntityFrameworkCore.Data.Migrations
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<string>("ModifiedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
@ -40,6 +42,10 @@ namespace EntityFrameworkCore.Data.Migrations
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<Guid>("Version")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Coaches");
@ -50,105 +56,120 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Christian Southgate",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Rob Mann",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Jon Curtis",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Andy Taylor",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Steve Johnson",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Dan Cook",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Ken Jarvis",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Kenny Suzuki",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Gordon Hall",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "John O Dowd",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Julian Widdows",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Andy Williams",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Trevor Williams",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Blake Deathray",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Rock Housebrick",
Version = new Guid("00000000-0000-0000-0000-000000000000")
});
});
@ -159,18 +180,25 @@ namespace EntityFrameworkCore.Data.Migrations
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<string>("ModifiedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<Guid>("Version")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.HasKey("Id");
@ -183,28 +211,32 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Local League",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "National League",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Geosphere",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
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"
Name = "Cyber war",
Version = new Guid("00000000-0000-0000-0000-000000000000")
});
});
@ -221,6 +253,7 @@ namespace EntityFrameworkCore.Data.Migrations
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
@ -236,12 +269,18 @@ namespace EntityFrameworkCore.Data.Migrations
.HasColumnType("INTEGER");
b.Property<string>("ModifiedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<decimal>("TicketPrice")
.HasPrecision(16, 2)
.HasColumnType("TEXT");
b.Property<Guid>("Version")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.HasKey("Id");
@ -263,6 +302,7 @@ namespace EntityFrameworkCore.Data.Migrations
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
@ -272,6 +312,7 @@ namespace EntityFrameworkCore.Data.Migrations
.HasColumnType("INTEGER");
b.Property<string>("ModifiedBy")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
@ -282,6 +323,10 @@ namespace EntityFrameworkCore.Data.Migrations
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<Guid>("Version")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CoachId")
@ -302,7 +347,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Neo Delhi",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -311,7 +357,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Voodoo",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -320,7 +367,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Penal X",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -329,7 +377,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Neo Tokyo",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -338,7 +387,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Neo Barcelona",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -347,7 +397,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Neo Manchester",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -356,7 +407,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Neo Bangkok",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -365,7 +417,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Neo Amsterdam",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -374,7 +427,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Killaklowns",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -383,7 +437,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Sol",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -392,7 +447,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "DEC",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -401,7 +457,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Leopards",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -410,7 +467,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Harlequins",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -419,7 +477,8 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Gladiators",
Version = new Guid("00000000-0000-0000-0000-000000000000")
},
new
{
@ -428,16 +487,19 @@ namespace EntityFrameworkCore.Data.Migrations
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"
Name = "Fiz-O",
Version = new Guid("00000000-0000-0000-0000-000000000000")
});
});
modelBuilder.Entity("EntityFrameworkCore.Domain.TeamsAndLeaguesView", b =>
{
b.Property<string>("LeagueName")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.ToTable((string)null);