using Microsoft.EntityFrameworkCore.Migrations; using System; namespace NadekoBot.Migrations { public partial class timedban : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "UnbanTimer", columns: table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), DateAdded = table.Column(nullable: true), GuildConfigId = table.Column(nullable: true), UnbanAt = table.Column(nullable: false), UserId = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_UnbanTimer", x => x.Id); table.ForeignKey( name: "FK_UnbanTimer_GuildConfigs_GuildConfigId", column: x => x.GuildConfigId, principalTable: "GuildConfigs", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_UnbanTimer_GuildConfigId", table: "UnbanTimer", column: "GuildConfigId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "UnbanTimer"); } } }