mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-24 22:21:30 +00:00
29 lines
940 B
C#
29 lines
940 B
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using LBPUnion.ProjectLighthouse;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
namespace ProjectLighthouse.Migrations
|
|
{
|
|
[DbContext(typeof(Database))]
|
|
[Migration("20211104031327_AddGameVersionToToken")]
|
|
public partial class AddGameVersionToToken : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.Sql("DELETE FROM Tokens;"); // Wipe all old tokens
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "GameVersion",
|
|
table: "Tokens",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 3);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "GameVersion",
|
|
table: "Tokens");
|
|
}
|
|
}
|
|
}
|