using System; using Microsoft.EntityFrameworkCore.Migrations; namespace NadekoBot.Migrations { public partial class antialt : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "AntiAltSetting", columns: table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), GuildConfigId = table.Column(nullable: false), MinAge = table.Column(nullable: false), Action = table.Column(nullable: false), ActionDurationMinutes = table.Column(nullable: false), RoleId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_AntiAltSetting", x => x.Id); table.ForeignKey( name: "FK_AntiAltSetting_GuildConfigs_GuildConfigId", column: x => x.GuildConfigId, principalTable: "GuildConfigs", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_AntiAltSetting_GuildConfigId", table: "AntiAltSetting", column: "GuildConfigId", unique: true); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "AntiAltSetting"); } } }