72 lines
2.0 KiB
C#
72 lines
2.0 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace TOOHUCardAPI.Migrations
|
|
{
|
|
public partial class newfields : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "AccountId",
|
|
table: "RankEntries");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Username",
|
|
table: "RankEntries");
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "AccountId",
|
|
table: "Users",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Username",
|
|
table: "Users",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AlterColumn<float>(
|
|
name: "Damage",
|
|
table: "RankEntries",
|
|
type: "real",
|
|
nullable: false,
|
|
oldClrType: typeof(long),
|
|
oldType: "bigint");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "AccountId",
|
|
table: "Users");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Username",
|
|
table: "Users");
|
|
|
|
migrationBuilder.AlterColumn<long>(
|
|
name: "Damage",
|
|
table: "RankEntries",
|
|
type: "bigint",
|
|
nullable: false,
|
|
oldClrType: typeof(float),
|
|
oldType: "real");
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "AccountId",
|
|
table: "RankEntries",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Username",
|
|
table: "RankEntries",
|
|
type: "text",
|
|
nullable: true);
|
|
}
|
|
}
|
|
}
|