mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2026-01-13 11:50:30 +01:00
99 lines
3.0 KiB
C#
99 lines
3.0 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AgentFieldNullability : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "ProtocolVersion",
|
|
schema: "agents",
|
|
table: "Agents",
|
|
type: "integer",
|
|
nullable: true,
|
|
oldClrType: typeof(int),
|
|
oldType: "integer");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "MaxMemory",
|
|
schema: "agents",
|
|
table: "Agents",
|
|
type: "integer",
|
|
nullable: true,
|
|
oldClrType: typeof(int),
|
|
oldType: "integer");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "MaxInstances",
|
|
schema: "agents",
|
|
table: "Agents",
|
|
type: "integer",
|
|
nullable: true,
|
|
oldClrType: typeof(int),
|
|
oldType: "integer");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "BuildVersion",
|
|
schema: "agents",
|
|
table: "Agents",
|
|
type: "text",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "ProtocolVersion",
|
|
schema: "agents",
|
|
table: "Agents",
|
|
type: "integer",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
oldClrType: typeof(int),
|
|
oldType: "integer",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "MaxMemory",
|
|
schema: "agents",
|
|
table: "Agents",
|
|
type: "integer",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
oldClrType: typeof(int),
|
|
oldType: "integer",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "MaxInstances",
|
|
schema: "agents",
|
|
table: "Agents",
|
|
type: "integer",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
oldClrType: typeof(int),
|
|
oldType: "integer",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "BuildVersion",
|
|
schema: "agents",
|
|
table: "Agents",
|
|
type: "text",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "text",
|
|
oldNullable: true);
|
|
}
|
|
}
|
|
}
|