Files
nadekobot/NadekoBot.Core/Migrations/20210406161747_bantemplate.cs
2021-09-06 21:29:22 +02:00

39 lines
1.2 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations
{
public partial class bantemplate : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "BanTemplates",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
DateAdded = table.Column<DateTime>(nullable: true),
GuildId = table.Column<ulong>(nullable: false),
Text = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_BanTemplates", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_BanTemplates_GuildId",
table: "BanTemplates",
column: "GuildId",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "BanTemplates");
}
}
}