60 lines
1.7 KiB
C#
60 lines
1.7 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace MagMan.Data.Admin.Migrations
|
|
{
|
|
public partial class MachineKeyAndDb : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "KeyName",
|
|
table: "AuthKeyList");
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "HasDb",
|
|
table: "MachineList",
|
|
type: "tinyint(1)",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "MainKey",
|
|
table: "MachineList",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "KeyNum",
|
|
table: "AuthKeyList",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "HasDb",
|
|
table: "MachineList");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "MainKey",
|
|
table: "MachineList");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "KeyNum",
|
|
table: "AuthKeyList");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "KeyName",
|
|
table: "AuthKeyList",
|
|
type: "longtext",
|
|
nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
}
|
|
}
|