mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
44 lines
1.5 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|