Files
SlipItIn/SlipItIn.Server/Migrations/20261004162039_UpdateGameRules.cs
Tim Krampitz 010e844976
All checks were successful
Build / build (push) Successful in 2m19s
Slip- und Beschuldigungslogik überarbeitet
Slips werden jetzt 30 Sekunden vorgehalten und anschließend automatisch abgeschlossen; direkte Spieler-Beschuldigungen, Win-Status, SignalR-Events, MAUI-UI, EF-Mapping/Migrationen sowie Tests wurden an die neue Spiellogik angepasst.
2026-10-04 19:14:16 +02:00

79 lines
2.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SlipItIn.Server.Migrations
{
/// <inheritdoc />
public partial class UpdateGameRules : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "TargetCardId",
table: "SlipChallenges",
type: "integer",
nullable: true,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AddColumn<DateTime>(
name: "SlippedAt",
table: "PlayerCards",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "WinnerPlayerId",
table: "Games",
type: "integer",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Games_WinnerPlayerId",
table: "Games",
column: "WinnerPlayerId");
migrationBuilder.AddForeignKey(
name: "FK_Games_Players_WinnerPlayerId",
table: "Games",
column: "WinnerPlayerId",
principalTable: "Players",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Games_Players_WinnerPlayerId",
table: "Games");
migrationBuilder.DropIndex(
name: "IX_Games_WinnerPlayerId",
table: "Games");
migrationBuilder.DropColumn(
name: "SlippedAt",
table: "PlayerCards");
migrationBuilder.DropColumn(
name: "WinnerPlayerId",
table: "Games");
migrationBuilder.AlterColumn<int>(
name: "TargetCardId",
table: "SlipChallenges",
type: "integer",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "integer",
oldNullable: true);
}
}
}