using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace NadekoBot.Migrations { /// public partial class greetsettings : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "GreetSettings", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), GuildId = table.Column(type: "INTEGER", nullable: false), GreetType = table.Column(type: "INTEGER", nullable: false), MessageText = table.Column(type: "TEXT", nullable: true), IsEnabled = table.Column(type: "INTEGER", nullable: false, defaultValue: false), ChannelId = table.Column(type: "INTEGER", nullable: true), AutoDeleteTimer = table.Column(type: "INTEGER", nullable: false, defaultValue: 0) }, constraints: table => { table.PrimaryKey("PK_GreetSettings", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_GreetSettings_GuildId_GreetType", table: "GreetSettings", columns: new[] { "GuildId", "GreetType" }, unique: true); MigrationQueries.GreetSettingsCopy(migrationBuilder); migrationBuilder.DropColumn( name: "AutoDeleteByeMessagesTimer", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "AutoDeleteGreetMessagesTimer", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "BoostMessage", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "BoostMessageChannelId", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "BoostMessageDeleteAfter", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "ByeMessageChannelId", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "ChannelByeMessageText", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "ChannelGreetMessageText", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "DmGreetMessageText", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "GreetMessageChannelId", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "SendBoostMessage", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "SendChannelByeMessage", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "SendChannelGreetMessage", table: "GuildConfigs"); migrationBuilder.DropColumn( name: "SendDmGreetMessage", table: "GuildConfigs"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "GreetSettings"); migrationBuilder.AddColumn( name: "AutoDeleteByeMessagesTimer", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "AutoDeleteGreetMessagesTimer", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "BoostMessage", table: "GuildConfigs", type: "TEXT", nullable: true); migrationBuilder.AddColumn( name: "BoostMessageChannelId", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: 0ul); migrationBuilder.AddColumn( name: "BoostMessageDeleteAfter", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "ByeMessageChannelId", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: 0ul); migrationBuilder.AddColumn( name: "ChannelByeMessageText", table: "GuildConfigs", type: "TEXT", nullable: true); migrationBuilder.AddColumn( name: "ChannelGreetMessageText", table: "GuildConfigs", type: "TEXT", nullable: true); migrationBuilder.AddColumn( name: "DmGreetMessageText", table: "GuildConfigs", type: "TEXT", nullable: true); migrationBuilder.AddColumn( name: "GreetMessageChannelId", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: 0ul); migrationBuilder.AddColumn( name: "SendBoostMessage", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "SendChannelByeMessage", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "SendChannelGreetMessage", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "SendDmGreetMessage", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: false); } } }