Roll back data migration issue with "TimeSlots" replacing "Teams"
This commit is contained in:
@@ -54,7 +54,7 @@ namespace Data.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TimeSlots",
|
||||
name: "Teams",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
@@ -91,7 +91,7 @@ namespace Data.Migrations
|
||||
table.ForeignKey(
|
||||
name: "FK_StudentTeam_Teams_TeamsId",
|
||||
column: x => x.TeamsId,
|
||||
principalTable: "TimeSlots",
|
||||
principalTable: "Teams",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
@@ -108,7 +108,7 @@ namespace Data.Migrations
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Teams_CaptainId",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
column: "CaptainId");
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Data.Migrations
|
||||
name: "StudentTeam");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TimeSlots");
|
||||
name: "Teams");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Students");
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Data.Migrations
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "TeamNumber",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
newName: "TeamId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
@@ -36,7 +36,7 @@ namespace Data.Migrations
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "TeamId",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
newName: "TeamNumber");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
|
||||
@@ -12,14 +12,14 @@ namespace Data.Migrations
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "EventId",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Name",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
@@ -47,12 +47,12 @@ namespace Data.Migrations
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Teams_EventId",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
column: "EventId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Teams_Events_EventId",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
column: "EventId",
|
||||
principalTable: "Events",
|
||||
principalColumn: "Id",
|
||||
@@ -64,19 +64,19 @@ namespace Data.Migrations
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Teams_Events_EventId",
|
||||
table: "TimeSlots");
|
||||
table: "Teams");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Teams_EventId",
|
||||
table: "TimeSlots");
|
||||
table: "Teams");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EventId",
|
||||
table: "TimeSlots");
|
||||
table: "Teams");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Name",
|
||||
table: "TimeSlots");
|
||||
table: "Teams");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Email",
|
||||
|
||||
@@ -12,11 +12,11 @@ namespace Data.Migrations
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Name",
|
||||
table: "TimeSlots");
|
||||
table: "Teams");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Number",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
@@ -27,11 +27,11 @@ namespace Data.Migrations
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Number",
|
||||
table: "TimeSlots");
|
||||
table: "Teams");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Name",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Data.Migrations
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Number",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
@@ -24,7 +24,7 @@ namespace Data.Migrations
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Number",
|
||||
table: "TimeSlots",
|
||||
table: "Teams",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Data.Migrations
|
||||
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.ToTable("Events");
|
||||
b.ToTable("Events", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.Student", b =>
|
||||
@@ -128,7 +128,7 @@ namespace Data.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Students");
|
||||
b.ToTable("Students", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.StudentEventRanking", b =>
|
||||
@@ -146,7 +146,7 @@ namespace Data.Migrations
|
||||
|
||||
b.HasIndex("StudentId");
|
||||
|
||||
b.ToTable("StudentEventRanking");
|
||||
b.ToTable("StudentEventRanking", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.Team", b =>
|
||||
@@ -173,7 +173,7 @@ namespace Data.Migrations
|
||||
|
||||
b.HasIndex("EventId");
|
||||
|
||||
b.ToTable("TimeSlots");
|
||||
b.ToTable("Teams", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("StudentTeam", b =>
|
||||
@@ -188,7 +188,7 @@ namespace Data.Migrations
|
||||
|
||||
b.HasIndex("TeamsId");
|
||||
|
||||
b.ToTable("StudentTeam");
|
||||
b.ToTable("StudentTeam", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.StudentEventRanking", b =>
|
||||
|
||||
Reference in New Issue
Block a user