33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using ChaosBot.Models;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace ChaosBot.Migrations
|
|
{
|
|
public partial class CustomCommand : Migration
|
|
{
|
|
private readonly string Table = "CustomCommands";
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: Table,
|
|
columns: table => new
|
|
{
|
|
DiscordGuildId = table.Column<ulong>(nullable: false),
|
|
Command = table.Column<string>(nullable: false, maxLength: 128),
|
|
Type = table.Column<CustomCommandType>(nullable: false),
|
|
Content = table.Column<string>(nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_CustomCommands", x => new { x.DiscordGuildId, x.Command });
|
|
});
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(name: Table);
|
|
}
|
|
}
|
|
}
|