Files
Watcher/watcher-monitoring/Migrations/20260121112553_changedServerAndContainerAttributeState.cs

52 lines
1.4 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace watcher_monitoring.Migrations
{
/// <inheritdoc />
public partial class changedServerAndContainerAttributeState : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsOnline",
table: "Servers");
migrationBuilder.AddColumn<string>(
name: "State",
table: "Servers",
type: "TEXT",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "State",
table: "Containers",
type: "TEXT",
nullable: false,
defaultValue: "");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "State",
table: "Servers");
migrationBuilder.DropColumn(
name: "State",
table: "Containers");
migrationBuilder.AddColumn<bool>(
name: "IsOnline",
table: "Servers",
type: "INTEGER",
nullable: false,
defaultValue: false);
}
}
}