mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CartriX.Api.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class ChangePrinterAgain : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "hostname",
|
|
table: "Printers");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "ipAddress",
|
|
table: "Printers",
|
|
newName: "ipAddressOrHostname");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.RenameColumn(
|
|
name: "ipAddressOrHostname",
|
|
table: "Printers",
|
|
newName: "ipAddress");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "hostname",
|
|
table: "Printers",
|
|
type: "TEXT",
|
|
nullable: true);
|
|
}
|
|
}
|
|
}
|