Efter flytt av statusfält och åter byygt
This commit is contained in:
178
GreadyPoang.DataLayer/Migrations/20250914064850_statusfieldmove.Designer.cs
generated
Normal file
178
GreadyPoang.DataLayer/Migrations/20250914064850_statusfieldmove.Designer.cs
generated
Normal file
@ -0,0 +1,178 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using GreadyPoang.DataLayer.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20250914064850_statusfieldmove")]
|
||||
partial class statusfieldmove
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "9.0.8");
|
||||
|
||||
modelBuilder.Entity("GreadyPoang.EntityLayer.GamePoint", b =>
|
||||
{
|
||||
b.Property<int>("GamePointId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("GameDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("GameRegPoints")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GameRoundId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GameRoundRegNr")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ParticipantId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("GamePointId");
|
||||
|
||||
b.ToTable("GamePoints");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
GamePointId = 1,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 10, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 1050,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 1,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 2,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 350,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 3,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 3,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 1000,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 2,
|
||||
ParticipantId = 3
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 4,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 400,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 4,
|
||||
ParticipantId = 3
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GreadyPoang.EntityLayer.GameRound", b =>
|
||||
{
|
||||
b.Property<int>("GameRoundId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("GameRoundFinished")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("GameRoundStartDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("GameStatus")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("GameRoundId");
|
||||
|
||||
b.ToTable("GameRounds");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
GameRoundId = 1,
|
||||
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
GameRoundStartDate = new DateTime(2025, 10, 15, 19, 10, 15, 0, DateTimeKind.Unspecified),
|
||||
GameStatus = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
GameRoundId = 2,
|
||||
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
GameRoundStartDate = new DateTime(2025, 9, 15, 19, 10, 15, 0, DateTimeKind.Unspecified),
|
||||
GameStatus = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
GameRoundId = 3,
|
||||
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
GameRoundStartDate = new DateTime(2025, 9, 20, 19, 10, 15, 0, DateTimeKind.Unspecified),
|
||||
GameStatus = 0
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GreadyPoang.EntityLayer.Participant", b =>
|
||||
{
|
||||
b.Property<int>("ParticipantId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("ParticipantId");
|
||||
|
||||
b.ToTable("Participants");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
ParticipantId = 1,
|
||||
Email = "John.Doe@gmail.com",
|
||||
FirstName = "John",
|
||||
LastName = "Doe"
|
||||
},
|
||||
new
|
||||
{
|
||||
ParticipantId = 2,
|
||||
Email = "jb@gmail.com",
|
||||
FirstName = "Jane",
|
||||
LastName = "Black"
|
||||
},
|
||||
new
|
||||
{
|
||||
ParticipantId = 3,
|
||||
Email = "mw@gmail.com",
|
||||
FirstName = "Mary",
|
||||
LastName = "White"
|
||||
});
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class statusfieldmove : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PointStatus",
|
||||
table: "GamePoints");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "GameStatus",
|
||||
table: "GameRounds",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GameRounds",
|
||||
keyColumn: "GameRoundId",
|
||||
keyValue: 1,
|
||||
column: "GameStatus",
|
||||
value: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GameRounds",
|
||||
keyColumn: "GameRoundId",
|
||||
keyValue: 2,
|
||||
column: "GameStatus",
|
||||
value: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GameRounds",
|
||||
keyColumn: "GameRoundId",
|
||||
keyValue: 3,
|
||||
column: "GameStatus",
|
||||
value: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GameStatus",
|
||||
table: "GameRounds");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PointStatus",
|
||||
table: "GamePoints",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 1,
|
||||
column: "PointStatus",
|
||||
value: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 2,
|
||||
column: "PointStatus",
|
||||
value: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 3,
|
||||
column: "PointStatus",
|
||||
value: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 4,
|
||||
column: "PointStatus",
|
||||
value: 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -38,9 +38,6 @@ namespace GreadyPoang.DataLayer.Migrations
|
||||
b.Property<int>("ParticipantId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("PointStatus")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("GamePointId");
|
||||
|
||||
b.ToTable("GamePoints");
|
||||
@ -53,8 +50,7 @@ namespace GreadyPoang.DataLayer.Migrations
|
||||
GameRegPoints = 1050,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 1,
|
||||
ParticipantId = 1,
|
||||
PointStatus = 0
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
@ -63,8 +59,7 @@ namespace GreadyPoang.DataLayer.Migrations
|
||||
GameRegPoints = 350,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 3,
|
||||
ParticipantId = 1,
|
||||
PointStatus = 0
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
@ -73,8 +68,7 @@ namespace GreadyPoang.DataLayer.Migrations
|
||||
GameRegPoints = 1000,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 2,
|
||||
ParticipantId = 3,
|
||||
PointStatus = 0
|
||||
ParticipantId = 3
|
||||
},
|
||||
new
|
||||
{
|
||||
@ -83,8 +77,7 @@ namespace GreadyPoang.DataLayer.Migrations
|
||||
GameRegPoints = 400,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 4,
|
||||
ParticipantId = 3,
|
||||
PointStatus = 0
|
||||
ParticipantId = 3
|
||||
});
|
||||
});
|
||||
|
||||
@ -100,6 +93,9 @@ namespace GreadyPoang.DataLayer.Migrations
|
||||
b.Property<DateTime>("GameRoundStartDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("GameStatus")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("GameRoundId");
|
||||
|
||||
b.ToTable("GameRounds");
|
||||
@ -109,19 +105,22 @@ namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
GameRoundId = 1,
|
||||
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
GameRoundStartDate = new DateTime(2025, 10, 15, 19, 10, 15, 0, DateTimeKind.Unspecified)
|
||||
GameRoundStartDate = new DateTime(2025, 10, 15, 19, 10, 15, 0, DateTimeKind.Unspecified),
|
||||
GameStatus = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
GameRoundId = 2,
|
||||
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
GameRoundStartDate = new DateTime(2025, 9, 15, 19, 10, 15, 0, DateTimeKind.Unspecified)
|
||||
GameRoundStartDate = new DateTime(2025, 9, 15, 19, 10, 15, 0, DateTimeKind.Unspecified),
|
||||
GameStatus = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
GameRoundId = 3,
|
||||
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
GameRoundStartDate = new DateTime(2025, 9, 20, 19, 10, 15, 0, DateTimeKind.Unspecified)
|
||||
GameRoundStartDate = new DateTime(2025, 9, 20, 19, 10, 15, 0, DateTimeKind.Unspecified),
|
||||
GameStatus = 0
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user