using System; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace NadekoBot.Migrations.Mysql { /// public partial class v5 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "nsfwblacklistedtags"); migrationBuilder.DropTable( name: "pollanswer"); migrationBuilder.DropTable( name: "pollvote"); migrationBuilder.DropTable( name: "poll"); migrationBuilder.DropUniqueConstraint( name: "ak_clubs_name", table: "clubs"); migrationBuilder.AlterColumn( name: "id", table: "xpshopowneditem", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "xpsettings", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "xprolereward", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "xpcurrencyreward", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "warnings", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "warningpunishment", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "waifuupdates", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "waifuitem", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "waifuinfo", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "vcroleinfo", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "userxpstats", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "unroletimer", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "unmutetimer", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "unbantimer", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "streamrolewhitelisteduser", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "streamrolesettings", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "streamroleblacklisteduser", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "streamonlinemessages", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "slowmodeignoreduser", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "slowmodeignoredrole", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "shopentryitem", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "shopentry", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AddColumn( name: "command", table: "shopentry", type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "id", table: "selfassignableroles", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "rotatingstatus", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "rewardedusers", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "repeaters", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "reminders", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AddColumn( name: "type", table: "reminders", type: "int", nullable: false, defaultValue: 0); migrationBuilder.AlterColumn( name: "id", table: "reactionroles", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "quotes", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "playlistsong", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "plantedcurrency", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "permissions", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "userid", table: "patrons", type: "bigint unsigned", nullable: false, oldClrType: typeof(ulong), oldType: "bigint unsigned") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "muteduserid", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "musicplaylists", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "musicplayersettings", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "logsettings", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "imageonlychannels", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "ignoredvoicepresencechannels", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "ignoredlogchannels", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "guildconfigs", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AddColumn( name: "stickyroles", table: "guildconfigs", type: "tinyint(1)", nullable: false, defaultValue: false); migrationBuilder.AlterColumn( name: "id", table: "groupname", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "gcchannelid", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "gamblingstats", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "followedstream", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "filterwordschannelid", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "filterlinkschannelid", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "filteredword", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "filterchannelid", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "feedsub", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "expressions", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "excludeditem", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "discorduser", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "discordpermoverrides", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "delmsgoncmdchannel", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "currencytransactions", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "commandcooldown", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "commandalias", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "name", table: "clubs", type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb4_bin", oldClrType: typeof(string), oldType: "varchar(20)", oldMaxLength: 20, oldCollation: "utf8mb4_bin") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "id", table: "clubs", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "blacklist", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "bantemplates", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "bankusers", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "autotranslateusers", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "autotranslatechannels", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "autopublishchannel", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "autocommands", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "antispamsetting", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "antispamignore", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "antiraidsetting", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "antialtsetting", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.CreateTable( name: "giveawaymodel", columns: table => new { id = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), guildid = table.Column(type: "bigint unsigned", nullable: false), messageid = table.Column(type: "bigint unsigned", nullable: false), channelid = table.Column(type: "bigint unsigned", nullable: false), message = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), endsat = table.Column(type: "datetime(6)", nullable: false) }, constraints: table => { table.PrimaryKey("pk_giveawaymodel", x => x.id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "stickyroles", columns: table => new { id = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), guildid = table.Column(type: "bigint unsigned", nullable: false), roleids = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), userid = table.Column(type: "bigint unsigned", nullable: false), dateadded = table.Column(type: "datetime(6)", nullable: true) }, constraints: table => { table.PrimaryKey("pk_stickyroles", x => x.id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "todosarchive", columns: table => new { id = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), userid = table.Column(type: "bigint unsigned", nullable: false), name = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("pk_todosarchive", x => x.id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "giveawayuser", columns: table => new { id = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), giveawayid = table.Column(type: "int", nullable: false), userid = table.Column(type: "bigint unsigned", nullable: false), name = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("pk_giveawayuser", x => x.id); table.ForeignKey( name: "fk_giveawayuser_giveawaymodel_giveawayid", column: x => x.giveawayid, principalTable: "giveawaymodel", principalColumn: "id", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "todos", columns: table => new { id = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), userid = table.Column(type: "bigint unsigned", nullable: false), todo = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), dateadded = table.Column(type: "datetime(6)", nullable: false), isdone = table.Column(type: "tinyint(1)", nullable: false), archiveid = table.Column(type: "int", nullable: true) }, constraints: table => { table.PrimaryKey("pk_todos", x => x.id); table.ForeignKey( name: "fk_todos_todosarchive_archiveid", column: x => x.archiveid, principalTable: "todosarchive", principalColumn: "id", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "ix_clubs_name", table: "clubs", column: "name", unique: true); migrationBuilder.CreateIndex( name: "ix_giveawayuser_giveawayid_userid", table: "giveawayuser", columns: new[] { "giveawayid", "userid" }, unique: true); migrationBuilder.CreateIndex( name: "ix_stickyroles_guildid_userid", table: "stickyroles", columns: new[] { "guildid", "userid" }, unique: true); migrationBuilder.CreateIndex( name: "ix_todos_archiveid", table: "todos", column: "archiveid"); migrationBuilder.CreateIndex( name: "ix_todos_userid", table: "todos", column: "userid"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "giveawayuser"); migrationBuilder.DropTable( name: "stickyroles"); migrationBuilder.DropTable( name: "todos"); migrationBuilder.DropTable( name: "giveawaymodel"); migrationBuilder.DropTable( name: "todosarchive"); migrationBuilder.DropIndex( name: "ix_clubs_name", table: "clubs"); migrationBuilder.DropColumn( name: "command", table: "shopentry"); migrationBuilder.DropColumn( name: "type", table: "reminders"); migrationBuilder.DropColumn( name: "stickyroles", table: "guildconfigs"); migrationBuilder.AlterColumn( name: "id", table: "xpshopowneditem", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "xpsettings", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "xprolereward", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "xpcurrencyreward", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "warnings", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "warningpunishment", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "waifuupdates", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "waifuitem", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "waifuinfo", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "vcroleinfo", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "userxpstats", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "unroletimer", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "unmutetimer", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "unbantimer", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "streamrolewhitelisteduser", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "streamrolesettings", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "streamroleblacklisteduser", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "streamonlinemessages", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "slowmodeignoreduser", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "slowmodeignoredrole", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "shopentryitem", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "shopentry", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "selfassignableroles", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "rotatingstatus", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "rewardedusers", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "repeaters", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "reminders", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "reactionroles", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "quotes", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "playlistsong", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "plantedcurrency", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "permissions", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "userid", table: "patrons", type: "bigint unsigned", nullable: false, oldClrType: typeof(ulong), oldType: "bigint unsigned") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "muteduserid", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "musicplaylists", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "musicplayersettings", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "logsettings", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "imageonlychannels", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "ignoredvoicepresencechannels", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "ignoredlogchannels", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "guildconfigs", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "groupname", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "gcchannelid", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "gamblingstats", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "followedstream", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "filterwordschannelid", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "filterlinkschannelid", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "filteredword", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "filterchannelid", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "feedsub", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "expressions", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "excludeditem", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "discorduser", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "discordpermoverrides", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "delmsgoncmdchannel", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "currencytransactions", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "commandcooldown", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "commandalias", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.UpdateData( table: "clubs", keyColumn: "name", keyValue: null, column: "name", value: ""); migrationBuilder.AlterColumn( name: "name", table: "clubs", type: "varchar(20)", maxLength: 20, nullable: false, collation: "utf8mb4_bin", oldClrType: typeof(string), oldType: "varchar(20)", oldMaxLength: 20, oldNullable: true, oldCollation: "utf8mb4_bin") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "id", table: "clubs", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "blacklist", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "bantemplates", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "bankusers", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "autotranslateusers", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "autotranslatechannels", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "autopublishchannel", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "autocommands", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "antispamsetting", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "antispamignore", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "antiraidsetting", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AlterColumn( name: "id", table: "antialtsetting", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AddUniqueConstraint( name: "ak_clubs_name", table: "clubs", column: "name"); migrationBuilder.CreateTable( name: "nsfwblacklistedtags", columns: table => new { id = table.Column(type: "int", nullable: false), dateadded = table.Column(type: "datetime(6)", nullable: true), guildid = table.Column(type: "bigint unsigned", nullable: false), tag = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("pk_nsfwblacklistedtags", x => x.id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "poll", columns: table => new { id = table.Column(type: "int", nullable: false), channelid = table.Column(type: "bigint unsigned", nullable: false), dateadded = table.Column(type: "datetime(6)", nullable: true), guildid = table.Column(type: "bigint unsigned", nullable: false), question = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("pk_poll", x => x.id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "pollanswer", columns: table => new { id = table.Column(type: "int", nullable: false), dateadded = table.Column(type: "datetime(6)", nullable: true), index = table.Column(type: "int", nullable: false), pollid = table.Column(type: "int", nullable: true), text = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("pk_pollanswer", x => x.id); table.ForeignKey( name: "fk_pollanswer_poll_pollid", column: x => x.pollid, principalTable: "poll", principalColumn: "id"); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "pollvote", columns: table => new { id = table.Column(type: "int", nullable: false), dateadded = table.Column(type: "datetime(6)", nullable: true), pollid = table.Column(type: "int", nullable: true), userid = table.Column(type: "bigint unsigned", nullable: false), voteindex = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("pk_pollvote", x => x.id); table.ForeignKey( name: "fk_pollvote_poll_pollid", column: x => x.pollid, principalTable: "poll", principalColumn: "id"); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "ix_nsfwblacklistedtags_guildid", table: "nsfwblacklistedtags", column: "guildid"); migrationBuilder.CreateIndex( name: "ix_poll_guildid", table: "poll", column: "guildid", unique: true); migrationBuilder.CreateIndex( name: "ix_pollanswer_pollid", table: "pollanswer", column: "pollid"); migrationBuilder.CreateIndex( name: "ix_pollvote_pollid", table: "pollvote", column: "pollid"); } } }