Efter flytt av statusfält och åter byygt

This commit is contained in:
2025-09-14 12:03:16 +02:00
parent b4898660f2
commit 4e2b71af9f
8 changed files with 336 additions and 45 deletions

View File

@ -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);
}
}
}