Client has been renamed to launcher, and thus namespaces and artifact names had to change. The server project has also had some artifacts renamed in order to create a more clear separation of builds. This will break auto-updates before v0.9.0.
49 lines
1.8 KiB
C#
49 lines
1.8 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace LANCommander.Launcher.Data.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddLocalPlaySessions : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "PlaySessions",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
Start = table.Column<DateTime>(type: "TEXT", nullable: true),
|
|
End = table.Column<DateTime>(type: "TEXT", nullable: true),
|
|
GameId = table.Column<Guid>(type: "TEXT", nullable: true),
|
|
UserId = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
CreatedOn = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|
UpdatedOn = table.Column<DateTime>(type: "TEXT", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_PlaySessions", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_PlaySessions_Games_GameId",
|
|
column: x => x.GameId,
|
|
principalTable: "Games",
|
|
principalColumn: "Id");
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_PlaySessions_GameId",
|
|
table: "PlaySessions",
|
|
column: "GameId");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "PlaySessions");
|
|
}
|
|
}
|
|
}
|