Files
nadekobot/NadekoBot.Core/Migrations/20180807095834_cleanup-2.cs
2021-09-06 21:29:22 +02:00

44 lines
1.5 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations
{
public partial class cleanup2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "LoadedPackages");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "LoadedPackages",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
BotConfigId = table.Column<int>(nullable: true),
DateAdded = table.Column<DateTime>(nullable: true),
Name = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_LoadedPackages", x => x.Id);
table.ForeignKey(
name: "FK_LoadedPackages_BotConfig_BotConfigId",
column: x => x.BotConfigId,
principalTable: "BotConfig",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_LoadedPackages_BotConfigId",
table: "LoadedPackages",
column: "BotConfigId");
}
}
}