mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-27 16:09:07 -07:00
Radicade Public Code
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using RadicadeServer.DB;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace RadicadeServer.Migrations
|
||||
{
|
||||
/// <summary>
|
||||
/// Who a room's join box is from. The box already travelled with RecNet's
|
||||
/// Gift.FromPlayerId, but no room could set it, so every join box arrived with a sender of
|
||||
/// zero and the client had no name to put on it.
|
||||
/// </summary>
|
||||
[DbContext(typeof(RecDBContext))]
|
||||
[Migration("20261015120000_AddRoomJoinGiftFromPlayerId")]
|
||||
public partial class AddRoomJoinGiftFromPlayerId : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql(@"
|
||||
IF COL_LENGTH(N'dbo.Rooms', N'JoinGiftFromPlayerId') IS NULL
|
||||
ALTER TABLE [Rooms] ADD [JoinGiftFromPlayerId] bigint NOT NULL DEFAULT 0;");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql(@"
|
||||
IF COL_LENGTH(N'dbo.Rooms', N'JoinGiftFromPlayerId') IS NOT NULL
|
||||
ALTER TABLE [Rooms] DROP COLUMN [JoinGiftFromPlayerId];");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user