using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Inventory.Core.Migrations
{
///
public partial class AddHealthMetrics : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Storage",
table: "Devices",
newName: "StorageDevices");
migrationBuilder.AddColumn(
name: "BatteryHealthPercent",
table: "Devices",
type: "float",
nullable: true);
migrationBuilder.AddColumn(
name: "CpuTemperature",
table: "Devices",
type: "float",
nullable: true);
migrationBuilder.AddColumn(
name: "DriveHealth",
table: "Devices",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn(
name: "GpuTemperature",
table: "Devices",
type: "float",
nullable: true);
migrationBuilder.AddColumn(
name: "LocalAdmins",
table: "Devices",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn(
name: "OsInstallDate",
table: "Devices",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn(
name: "Printers",
table: "Devices",
type: "nvarchar(max)",
nullable: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "BatteryHealthPercent",
table: "Devices");
migrationBuilder.DropColumn(
name: "CpuTemperature",
table: "Devices");
migrationBuilder.DropColumn(
name: "DriveHealth",
table: "Devices");
migrationBuilder.DropColumn(
name: "GpuTemperature",
table: "Devices");
migrationBuilder.DropColumn(
name: "LocalAdmins",
table: "Devices");
migrationBuilder.DropColumn(
name: "OsInstallDate",
table: "Devices");
migrationBuilder.DropColumn(
name: "Printers",
table: "Devices");
migrationBuilder.RenameColumn(
name: "StorageDevices",
table: "Devices",
newName: "Storage");
}
}
}