Files
magman/MagMan.Data.Admin/Migrations/20240112134116_UpdateKeyModel.cs
T
2024-01-12 15:19:39 +01:00

49 lines
1.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MagMan.Data.Admin.Migrations
{
public partial class UpdateKeyModel : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "MachineID",
table: "AuthKeyList",
newName: "AuthKeyID");
migrationBuilder.AddColumn<DateTime>(
name: "DtActivation",
table: "AuthKeyList",
type: "datetime(6)",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<bool>(
name: "IsActive",
table: "AuthKeyList",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DtActivation",
table: "AuthKeyList");
migrationBuilder.DropColumn(
name: "IsActive",
table: "AuthKeyList");
migrationBuilder.RenameColumn(
name: "AuthKeyID",
table: "AuthKeyList",
newName: "MachineID");
}
}
}