using System; using Microsoft.EntityFrameworkCore.Migrations; namespace NadekoBot.Migrations { public partial class goodbyebotconfig : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "AutoCommands", columns: table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), DateAdded = table.Column(nullable: true), CommandText = table.Column(nullable: true), ChannelId = table.Column(nullable: false), ChannelName = table.Column(nullable: true), GuildId = table.Column(nullable: true), GuildName = table.Column(nullable: true), VoiceChannelId = table.Column(nullable: true), VoiceChannelName = table.Column(nullable: true), Interval = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_AutoCommands", x => x.Id); }); migrationBuilder.CreateTable( name: "Blacklist", columns: table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), DateAdded = table.Column(nullable: true), ItemId = table.Column(nullable: false), Type = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Blacklist", x => x.Id); }); migrationBuilder.CreateTable( name: "RotatingStatus", columns: table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), DateAdded = table.Column(nullable: true), Status = table.Column(nullable: true), Type = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_RotatingStatus", x => x.Id); }); Helper.BotconfigClear(migrationBuilder); migrationBuilder.DropTable( name: "BlacklistItem"); migrationBuilder.DropTable( name: "RaceAnimals"); migrationBuilder.DropTable( name: "EightballResponses"); migrationBuilder.DropTable( name: "PlayingStatus"); migrationBuilder.DropTable( name: "StartupCommand"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "AutoCommands"); migrationBuilder.DropTable( name: "Blacklist"); migrationBuilder.DropTable( name: "RotatingStatus"); migrationBuilder.CreateTable( name: "BotConfig", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), BetflipMultiplier = table.Column(type: "REAL", nullable: false), Betroll100Multiplier = table.Column(type: "REAL", nullable: false), Betroll67Multiplier = table.Column(type: "REAL", nullable: false), Betroll91Multiplier = table.Column(type: "REAL", nullable: false), BufferSize = table.Column(type: "INTEGER", nullable: false), CheckForUpdates = table.Column(type: "INTEGER", nullable: false), ConsoleOutputType = table.Column(type: "INTEGER", nullable: false), CurrencyDropAmount = table.Column(type: "INTEGER", nullable: false), CurrencyDropAmountMax = table.Column(type: "INTEGER", nullable: true), CurrencyGenerationChance = table.Column(type: "REAL", nullable: false), CurrencyGenerationCooldown = table.Column(type: "INTEGER", nullable: false), CurrencyGenerationPassword = table.Column(type: "INTEGER", nullable: false), CurrencyName = table.Column(type: "TEXT", nullable: true), CurrencyPluralName = table.Column(type: "TEXT", nullable: true), CurrencySign = table.Column(type: "TEXT", nullable: true), CustomReactionsStartWith = table.Column(type: "INTEGER", nullable: false), DMHelpString = table.Column(type: "TEXT", nullable: true), DailyCurrencyDecay = table.Column(type: "REAL", nullable: false), DateAdded = table.Column(type: "TEXT", nullable: true), DefaultPrefix = table.Column(type: "TEXT", nullable: true), DivorcePriceMultiplier = table.Column(type: "INTEGER", nullable: false), ErrorColor = table.Column(type: "TEXT", nullable: true), ForwardMessages = table.Column(type: "INTEGER", nullable: false), ForwardToAllOwners = table.Column(type: "INTEGER", nullable: false), GroupGreets = table.Column(type: "INTEGER", nullable: false), HasMigratedBotSettings = table.Column(type: "INTEGER", nullable: false, defaultValue: true), HasMigratedGamblingSettings = table.Column(type: "INTEGER", nullable: false, defaultValue: true), HasMigratedXpSettings = table.Column(type: "INTEGER", nullable: false, defaultValue: true), HelpString = table.Column(type: "TEXT", nullable: true), LastCurrencyDecay = table.Column(type: "TEXT", nullable: false), LastUpdate = table.Column(type: "TEXT", nullable: false), Locale = table.Column(type: "TEXT", nullable: true), MaxBet = table.Column(type: "INTEGER", nullable: false), MaxXpMinutes = table.Column(type: "INTEGER", nullable: false), MigrationVersion = table.Column(type: "INTEGER", nullable: false), MinBet = table.Column(type: "INTEGER", nullable: false), MinWaifuPrice = table.Column(type: "INTEGER", nullable: false), MinimumBetAmount = table.Column(type: "INTEGER", nullable: false), MinimumTriviaWinReq = table.Column(type: "INTEGER", nullable: false), OkColor = table.Column(type: "TEXT", nullable: true), PatreonCurrencyPerCent = table.Column(type: "REAL", nullable: false), PermissionVersion = table.Column(type: "INTEGER", nullable: false), RemindMessageFormat = table.Column(type: "TEXT", nullable: true), RotatingStatuses = table.Column(type: "INTEGER", nullable: false), TimelyCurrency = table.Column(type: "INTEGER", nullable: false), TimelyCurrencyPeriod = table.Column(type: "INTEGER", nullable: false), TriviaCurrencyReward = table.Column(type: "INTEGER", nullable: false), UpdateString = table.Column(type: "TEXT", nullable: true), VoiceXpPerMinute = table.Column(type: "REAL", nullable: false), WaifuGiftMultiplier = table.Column(type: "INTEGER", nullable: false), XpMinutesTimeout = table.Column(type: "INTEGER", nullable: false), XpPerMessage = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_BotConfig", x => x.Id); }); migrationBuilder.CreateTable( name: "BlacklistItem", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), BotConfigId = table.Column(type: "INTEGER", nullable: true), DateAdded = table.Column(type: "TEXT", nullable: true), ItemId = table.Column(type: "INTEGER", nullable: false), Type = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_BlacklistItem", x => x.Id); table.ForeignKey( name: "FK_BlacklistItem_BotConfig_BotConfigId", column: x => x.BotConfigId, principalTable: "BotConfig", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "PlayingStatus", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), BotConfigId = table.Column(type: "INTEGER", nullable: true), DateAdded = table.Column(type: "TEXT", nullable: true), Status = table.Column(type: "TEXT", nullable: true), Type = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_PlayingStatus", x => x.Id); table.ForeignKey( name: "FK_PlayingStatus_BotConfig_BotConfigId", column: x => x.BotConfigId, principalTable: "BotConfig", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "StartupCommand", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), BotConfigId = table.Column(type: "INTEGER", nullable: true), ChannelId = table.Column(type: "INTEGER", nullable: false), ChannelName = table.Column(type: "TEXT", nullable: true), CommandText = table.Column(type: "TEXT", nullable: true), DateAdded = table.Column(type: "TEXT", nullable: true), GuildId = table.Column(type: "INTEGER", nullable: true), GuildName = table.Column(type: "TEXT", nullable: true), Index = table.Column(type: "INTEGER", nullable: false), Interval = table.Column(type: "INTEGER", nullable: false), VoiceChannelId = table.Column(type: "INTEGER", nullable: true), VoiceChannelName = table.Column(type: "TEXT", 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); }); } } }