Add migration to remove TeamID.
This commit is contained in:
parent
278064b19b
commit
1a8cafbc4a
279
EntityFrameworkCore.Data/Migrations/20250406180942_RemoveTeamId.Designer.cs
generated
Normal file
279
EntityFrameworkCore.Data/Migrations/20250406180942_RemoveTeamId.Designer.cs
generated
Normal file
@ -0,0 +1,279 @@
|
||||
// <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("20250406180942_RemoveTeamId")]
|
||||
partial class RemoveTeamId
|
||||
{
|
||||
/// <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.HasKey("Id");
|
||||
|
||||
b.ToTable("Leagues");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EntityFrameworkCore.Domain.Match", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("AwayTeamId")
|
||||
.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<string>("ModifiedBy")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("ModifiedDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal>("TicketPrice")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
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.ToTable("Teams");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Neo Delhi"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Voodoo"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 3,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Penal X"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 4,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Neo Tokyo"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 5,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Neo Barcelona"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 6,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Neo Manchester"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 7,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Neo Bangkok"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 8,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Neo Amsterdam"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 9,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Killaklowns"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 10,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Sol"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 11,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "DEC"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 12,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Leopards"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 13,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Harlequins"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 14,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Gladiators"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 15,
|
||||
CoachId = 0,
|
||||
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),
|
||||
Name = "Fiz-O"
|
||||
});
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,133 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EntityFrameworkCore.Data.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RemoveTeamId : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TeamId",
|
||||
table: "Teams");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TeamId",
|
||||
table: "Teams",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 3,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 4,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 5,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 6,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 7,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 8,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 9,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 10,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 11,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 12,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 13,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 14,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Teams",
|
||||
keyColumn: "Id",
|
||||
keyValue: 15,
|
||||
column: "TeamId",
|
||||
value: null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -129,9 +129,6 @@ namespace EntityFrameworkCore.Data.Migrations
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("TeamId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Teams");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user