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