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(nullable: false) .Annotation("Sqlite:Autoincrement", true), BotConfigId = table.Column(nullable: true), DateAdded = table.Column(nullable: true), Name = table.Column(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"); } } }