Files
Radicade/Server/Migrations/20260808113840_LeaderboardScores.cs
2026-10-16 23:33:13 -07:00

47 lines
1.7 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RadicadeServer.Migrations
{
public partial class LeaderboardScores : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "LeaderboardScores",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoomId = table.Column<long>(type: "bigint", nullable: false),
SubRoomId = table.Column<long>(type: "bigint", nullable: false),
PlayerId = table.Column<long>(type: "bigint", nullable: false),
StatChannel = table.Column<int>(type: "int", nullable: false),
Score = table.Column<double>(type: "float", nullable: false),
Time = table.Column<long>(type: "bigint", nullable: false),
SubmittedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_LeaderboardScores", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_LeaderboardScores_RoomId_StatChannel_PlayerId",
table: "LeaderboardScores",
columns: new[] { "RoomId", "StatChannel", "PlayerId" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "LeaderboardScores");
}
}
}