2025-03-25 01:09:21 -05:00
|
|
|
|
using System;
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
2025-03-23 20:19:18 -05:00
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
|
|
namespace LANCommander.Migrations
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <inheritdoc />
|
2025-03-25 01:09:21 -05:00
|
|
|
|
public partial class AddDockerContainerFields : Migration
|
2025-03-23 20:19:18 -05:00
|
|
|
|
{
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
|
{
|
|
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
|
|
|
|
name: "ContainerId",
|
|
|
|
|
|
table: "Servers",
|
|
|
|
|
|
type: "TEXT",
|
2025-03-25 01:09:21 -05:00
|
|
|
|
maxLength: 64,
|
2025-03-23 20:19:18 -05:00
|
|
|
|
nullable: false,
|
|
|
|
|
|
defaultValue: "");
|
|
|
|
|
|
|
2025-03-25 01:09:21 -05:00
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
2025-03-23 20:19:18 -05:00
|
|
|
|
name: "DockerHostId",
|
|
|
|
|
|
table: "Servers",
|
|
|
|
|
|
type: "TEXT",
|
2025-03-25 01:09:21 -05:00
|
|
|
|
nullable: true);
|
2025-03-23 20:19:18 -05:00
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
|
|
|
|
name: "Engine",
|
|
|
|
|
|
table: "Servers",
|
|
|
|
|
|
type: "INTEGER",
|
|
|
|
|
|
nullable: false,
|
|
|
|
|
|
defaultValue: 0);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
|
{
|
|
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
|
|
name: "ContainerId",
|
|
|
|
|
|
table: "Servers");
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
|
|
name: "DockerHostId",
|
|
|
|
|
|
table: "Servers");
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
|
|
name: "Engine",
|
|
|
|
|
|
table: "Servers");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|