Add project files.
This commit is contained in:
70
Gready_Poang.DataLayer/Migrations/20250901152226_initialCreate.Designer.cs
generated
Normal file
70
Gready_Poang.DataLayer/Migrations/20250901152226_initialCreate.Designer.cs
generated
Normal file
@ -0,0 +1,70 @@
|
||||
// <auto-generated />
|
||||
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("20250901152226_initialCreate")]
|
||||
partial class initialCreate
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "9.0.8");
|
||||
|
||||
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,48 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class initialCreate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Participants",
|
||||
columns: table => new
|
||||
{
|
||||
ParticipantId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
FirstName = table.Column<string>(type: "TEXT", nullable: false),
|
||||
LastName = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Email = table.Column<string>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Participants", x => x.ParticipantId);
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Participants",
|
||||
columns: new[] { "ParticipantId", "Email", "FirstName", "LastName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 1, "John.Doe@gmail.com", "John", "Doe" },
|
||||
{ 2, "jb@gmail.com", "Jane", "Black" },
|
||||
{ 3, "mw@gmail.com", "Mary", "White" }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Participants");
|
||||
}
|
||||
}
|
||||
}
|
||||
135
Gready_Poang.DataLayer/Migrations/20250902115700_GamePointsTable.Designer.cs
generated
Normal file
135
Gready_Poang.DataLayer/Migrations/20250902115700_GamePointsTable.Designer.cs
generated
Normal file
@ -0,0 +1,135 @@
|
||||
// <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("20250902115700_GamePointsTable")]
|
||||
partial class GamePointsTable
|
||||
{
|
||||
/// <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>("GameHeatId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GameHeatRegNr")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GameRegPoints")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ParticipantId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("GamePointId");
|
||||
|
||||
b.ToTable("GamePoints");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
GamePointId = 1,
|
||||
GameDate = new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8341),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 1,
|
||||
GameRegPoints = 1050,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 2,
|
||||
GameDate = new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8923),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 3,
|
||||
GameRegPoints = 350,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 3,
|
||||
GameDate = new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8927),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 2,
|
||||
GameRegPoints = 1000,
|
||||
ParticipantId = 3
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 4,
|
||||
GameDate = new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8929),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 4,
|
||||
GameRegPoints = 400,
|
||||
ParticipantId = 3
|
||||
});
|
||||
});
|
||||
|
||||
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,52 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class GamePointsTable : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GamePoints",
|
||||
columns: table => new
|
||||
{
|
||||
GamePointId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
ParticipantId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
GameHeatId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
GameDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
GameHeatRegNr = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
GameRegPoints = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GamePoints", x => x.GamePointId);
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "GamePoints",
|
||||
columns: new[] { "GamePointId", "GameDate", "GameHeatId", "GameHeatRegNr", "GameRegPoints", "ParticipantId" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 1, new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8341), 0, 1, 1050, 1 },
|
||||
{ 2, new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8923), 0, 3, 350, 1 },
|
||||
{ 3, new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8927), 0, 2, 1000, 3 },
|
||||
{ 4, new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8929), 0, 4, 400, 3 }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "GamePoints");
|
||||
}
|
||||
}
|
||||
}
|
||||
135
Gready_Poang.DataLayer/Migrations/20250902120934_GamePointsTableStaticSeed.Designer.cs
generated
Normal file
135
Gready_Poang.DataLayer/Migrations/20250902120934_GamePointsTableStaticSeed.Designer.cs
generated
Normal file
@ -0,0 +1,135 @@
|
||||
// <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("20250902120934_GamePointsTableStaticSeed")]
|
||||
partial class GamePointsTableStaticSeed
|
||||
{
|
||||
/// <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>("GameHeatId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GameHeatRegNr")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GameRegPoints")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ParticipantId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("GamePointId");
|
||||
|
||||
b.ToTable("GamePoints");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
GamePointId = 1,
|
||||
GameDate = new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(5394),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 1,
|
||||
GameRegPoints = 1050,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 2,
|
||||
GameDate = new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(6081),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 3,
|
||||
GameRegPoints = 350,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 3,
|
||||
GameDate = new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(6085),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 2,
|
||||
GameRegPoints = 1000,
|
||||
ParticipantId = 3
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 4,
|
||||
GameDate = new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(6088),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 4,
|
||||
GameRegPoints = 400,
|
||||
ParticipantId = 3
|
||||
});
|
||||
});
|
||||
|
||||
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,75 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class GamePointsTableStaticSeed : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 1,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(5394));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 2,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(6081));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 3,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(6085));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 4,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(6088));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 1,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8341));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 2,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8923));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 3,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8927));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 4,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 13, 56, 59, 539, DateTimeKind.Local).AddTicks(8929));
|
||||
}
|
||||
}
|
||||
}
|
||||
135
Gready_Poang.DataLayer/Migrations/20250902122130_FixDateTimeSeed.Designer.cs
generated
Normal file
135
Gready_Poang.DataLayer/Migrations/20250902122130_FixDateTimeSeed.Designer.cs
generated
Normal file
@ -0,0 +1,135 @@
|
||||
// <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("20250902122130_FixDateTimeSeed")]
|
||||
partial class FixDateTimeSeed
|
||||
{
|
||||
/// <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>("GameHeatId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GameHeatRegNr")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GameRegPoints")
|
||||
.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),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 1,
|
||||
GameRegPoints = 1050,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 2,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 3,
|
||||
GameRegPoints = 350,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 3,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 2,
|
||||
GameRegPoints = 1000,
|
||||
ParticipantId = 3
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 4,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 4,
|
||||
GameRegPoints = 400,
|
||||
ParticipantId = 3
|
||||
});
|
||||
});
|
||||
|
||||
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,75 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixDateTimeSeed : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 1,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 10, 15, 20, 10, 15, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 2,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 3,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 4,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 1,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(5394));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 2,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(6081));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 3,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(6085));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 4,
|
||||
column: "GameDate",
|
||||
value: new DateTime(2025, 9, 2, 14, 9, 34, 269, DateTimeKind.Local).AddTicks(6088));
|
||||
}
|
||||
}
|
||||
}
|
||||
135
Gready_Poang.DataLayer/Migrations/20250903062957_FixHeatToRoundParameter.Designer.cs
generated
Normal file
135
Gready_Poang.DataLayer/Migrations/20250903062957_FixHeatToRoundParameter.Designer.cs
generated
Normal file
@ -0,0 +1,135 @@
|
||||
// <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("20250903062957_FixHeatToRoundParameter")]
|
||||
partial class FixHeatToRoundParameter
|
||||
{
|
||||
/// <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>("GameHeatId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GameHeatRegNr")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GameRegPoints")
|
||||
.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),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 1,
|
||||
GameRegPoints = 1050,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 2,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 3,
|
||||
GameRegPoints = 350,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 3,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 2,
|
||||
GameRegPoints = 1000,
|
||||
ParticipantId = 3
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 4,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
|
||||
GameHeatId = 0,
|
||||
GameHeatRegNr = 4,
|
||||
GameRegPoints = 400,
|
||||
ParticipantId = 3
|
||||
});
|
||||
});
|
||||
|
||||
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,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixHeatToRoundParameter : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
135
Gready_Poang.DataLayer/Migrations/20250903070200_FixHeatToRoundParams.Designer.cs
generated
Normal file
135
Gready_Poang.DataLayer/Migrations/20250903070200_FixHeatToRoundParams.Designer.cs
generated
Normal file
@ -0,0 +1,135 @@
|
||||
// <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("20250903070200_FixHeatToRoundParams")]
|
||||
partial class FixHeatToRoundParams
|
||||
{
|
||||
/// <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 = 0,
|
||||
GameRoundRegNr = 1,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 2,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 350,
|
||||
GameRoundId = 0,
|
||||
GameRoundRegNr = 3,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 3,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 1000,
|
||||
GameRoundId = 0,
|
||||
GameRoundRegNr = 2,
|
||||
ParticipantId = 3
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 4,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 400,
|
||||
GameRoundId = 0,
|
||||
GameRoundRegNr = 4,
|
||||
ParticipantId = 3
|
||||
});
|
||||
});
|
||||
|
||||
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,38 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixHeatToRoundParams : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GameHeatRegNr",
|
||||
table: "GamePoints",
|
||||
newName: "GameRoundRegNr");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GameHeatId",
|
||||
table: "GamePoints",
|
||||
newName: "GameRoundId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GameRoundRegNr",
|
||||
table: "GamePoints",
|
||||
newName: "GameHeatRegNr");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GameRoundId",
|
||||
table: "GamePoints",
|
||||
newName: "GameHeatId");
|
||||
}
|
||||
}
|
||||
}
|
||||
135
Gready_Poang.DataLayer/Migrations/20250903074537_AddedStatusEnum.Designer.cs
generated
Normal file
135
Gready_Poang.DataLayer/Migrations/20250903074537_AddedStatusEnum.Designer.cs
generated
Normal file
@ -0,0 +1,135 @@
|
||||
// <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("20250903074537_AddedStatusEnum")]
|
||||
partial class AddedStatusEnum
|
||||
{
|
||||
/// <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 = 0,
|
||||
GameRoundRegNr = 1,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 2,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 350,
|
||||
GameRoundId = 0,
|
||||
GameRoundRegNr = 3,
|
||||
ParticipantId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 3,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 1000,
|
||||
GameRoundId = 0,
|
||||
GameRoundRegNr = 2,
|
||||
ParticipantId = 3
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 4,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 400,
|
||||
GameRoundId = 0,
|
||||
GameRoundRegNr = 4,
|
||||
ParticipantId = 3
|
||||
});
|
||||
});
|
||||
|
||||
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,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedStatusEnum : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
179
Gready_Poang.DataLayer/Migrations/20250903195147_AddedTableGameRounds.Designer.cs
generated
Normal file
179
Gready_Poang.DataLayer/Migrations/20250903195147_AddedTableGameRounds.Designer.cs
generated
Normal file
@ -0,0 +1,179 @@
|
||||
// <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("20250903195147_AddedTableGameRounds")]
|
||||
partial class AddedTableGameRounds
|
||||
{
|
||||
/// <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.Property<int>("PointStatus")
|
||||
.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,
|
||||
PointStatus = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 2,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 350,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 3,
|
||||
ParticipantId = 1,
|
||||
PointStatus = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 3,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 1000,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 2,
|
||||
ParticipantId = 3,
|
||||
PointStatus = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 4,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 400,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 4,
|
||||
ParticipantId = 3,
|
||||
PointStatus = 0
|
||||
});
|
||||
});
|
||||
|
||||
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.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)
|
||||
},
|
||||
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)
|
||||
},
|
||||
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)
|
||||
});
|
||||
});
|
||||
|
||||
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,115 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedTableGameRounds : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PointStatus",
|
||||
table: "GamePoints",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GameRounds",
|
||||
columns: table => new
|
||||
{
|
||||
GameRoundId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GameRoundFinished = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
GameRoundStartDate = table.Column<DateTime>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GameRounds", x => x.GameRoundId);
|
||||
});
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 1,
|
||||
columns: new[] { "GameRoundId", "PointStatus" },
|
||||
values: new object[] { 2, 0 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 2,
|
||||
columns: new[] { "GameRoundId", "PointStatus" },
|
||||
values: new object[] { 2, 0 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 3,
|
||||
columns: new[] { "GameRoundId", "PointStatus" },
|
||||
values: new object[] { 2, 0 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 4,
|
||||
columns: new[] { "GameRoundId", "PointStatus" },
|
||||
values: new object[] { 2, 0 });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "GameRounds",
|
||||
columns: new[] { "GameRoundId", "GameRoundFinished", "GameRoundStartDate" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 1, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(2025, 10, 15, 19, 10, 15, 0, DateTimeKind.Unspecified) },
|
||||
{ 2, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(2025, 9, 15, 19, 10, 15, 0, DateTimeKind.Unspecified) },
|
||||
{ 3, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(2025, 9, 20, 19, 10, 15, 0, DateTimeKind.Unspecified) }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "GameRounds");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PointStatus",
|
||||
table: "GamePoints");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 1,
|
||||
column: "GameRoundId",
|
||||
value: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 2,
|
||||
column: "GameRoundId",
|
||||
value: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 3,
|
||||
column: "GameRoundId",
|
||||
value: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "GamePoints",
|
||||
keyColumn: "GamePointId",
|
||||
keyValue: 4,
|
||||
column: "GameRoundId",
|
||||
value: 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
179
Gready_Poang.DataLayer/Migrations/20250903195935_ChangedUpdateOrderInSeeding.Designer.cs
generated
Normal file
179
Gready_Poang.DataLayer/Migrations/20250903195935_ChangedUpdateOrderInSeeding.Designer.cs
generated
Normal file
@ -0,0 +1,179 @@
|
||||
// <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("20250903195935_ChangedUpdateOrderInSeeding")]
|
||||
partial class ChangedUpdateOrderInSeeding
|
||||
{
|
||||
/// <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.Property<int>("PointStatus")
|
||||
.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,
|
||||
PointStatus = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 2,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 350,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 3,
|
||||
ParticipantId = 1,
|
||||
PointStatus = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 3,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 1000,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 2,
|
||||
ParticipantId = 3,
|
||||
PointStatus = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
GamePointId = 4,
|
||||
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
|
||||
GameRegPoints = 400,
|
||||
GameRoundId = 2,
|
||||
GameRoundRegNr = 4,
|
||||
ParticipantId = 3,
|
||||
PointStatus = 0
|
||||
});
|
||||
});
|
||||
|
||||
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.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)
|
||||
},
|
||||
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)
|
||||
},
|
||||
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)
|
||||
});
|
||||
});
|
||||
|
||||
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,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ChangedUpdateOrderInSeeding : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
178
Gready_Poang.DataLayer/Migrations/20250914064850_statusfieldmove.Designer.cs
generated
Normal file
178
Gready_Poang.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
175
Gready_Poang.DataLayer/Migrations/DataContextModelSnapshot.cs
Normal file
175
Gready_Poang.DataLayer/Migrations/DataContextModelSnapshot.cs
Normal file
@ -0,0 +1,175 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using GreadyPoang.DataLayer.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
partial class DataContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user