using System; using Microsoft.EntityFrameworkCore.Migrations; namespace NadekoBot.Migrations { public partial class startupcommands : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "StartupCommand", columns: table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), BotConfigId = table.Column(nullable: true), ChannelId = table.Column(nullable: false), ChannelName = table.Column(nullable: true), CommandText = table.Column(nullable: true), DateAdded = table.Column(nullable: true), GuildId = table.Column(nullable: true), GuildName = table.Column(nullable: true), Index = table.Column(nullable: false), VoiceChannelId = table.Column(nullable: true), VoiceChannelName = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_StartupCommand", x => x.Id); table.ForeignKey( name: "FK_StartupCommand_BotConfig_BotConfigId", column: x => x.BotConfigId, principalTable: "BotConfig", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_StartupCommand_BotConfigId", table: "StartupCommand", column: "BotConfigId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "StartupCommand"); } } }