diff --git a/src/MysqlMigrations/Migrations/20250906052847_Patch250905.Designer.cs b/src/MysqlMigrations/Migrations/20250906052847_Patch250905.Designer.cs new file mode 100644 index 00000000..c21f3309 --- /dev/null +++ b/src/MysqlMigrations/Migrations/20250906052847_Patch250905.Designer.cs @@ -0,0 +1,2496 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using dsstats.db8; + +#nullable disable + +namespace MysqlMigrations.Migrations +{ + [DbContext(typeof(ReplayContext))] + [Migration("20250906052847_Patch250905")] + partial class Patch250905 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.17") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("DsAbilityDsUnit", b => + { + b.Property("AbilitiesDsAbilityId") + .HasColumnType("int"); + + b.Property("DsUnitsDsUnitId") + .HasColumnType("int"); + + b.HasKey("AbilitiesDsAbilityId", "DsUnitsDsUnitId"); + + b.HasIndex("DsUnitsDsUnitId"); + + b.ToTable("DsAbilityDsUnit"); + }); + + modelBuilder.Entity("ReplayUploader", b => + { + b.Property("ReplaysReplayId") + .HasColumnType("int"); + + b.Property("UploadersUploaderId") + .HasColumnType("int"); + + b.HasKey("ReplaysReplayId", "UploadersUploaderId"); + + b.HasIndex("UploadersUploaderId"); + + b.ToTable("UploaderReplays", (string)null); + }); + + modelBuilder.Entity("dsstats.db8.ArcadePlayerRating", b => + { + b.Property("ArcadePlayerRatingId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ArcadePlayerRatingId")); + + b.Property("Confidence") + .HasColumnType("double"); + + b.Property("Consistency") + .HasColumnType("double"); + + b.Property("Games") + .HasColumnType("int"); + + b.Property("IsUploader") + .HasColumnType("tinyint(1)"); + + b.Property("Main") + .HasColumnType("int"); + + b.Property("MainCount") + .HasColumnType("int"); + + b.Property("Mvp") + .HasColumnType("int"); + + b.Property("PlayerId") + .HasColumnType("int"); + + b.Property("Pos") + .HasColumnType("int"); + + b.Property("Rating") + .HasColumnType("double"); + + b.Property("RatingType") + .HasColumnType("int"); + + b.Property("TeamGames") + .HasColumnType("int"); + + b.Property("Wins") + .HasColumnType("int"); + + b.HasKey("ArcadePlayerRatingId"); + + b.HasIndex("PlayerId"); + + b.HasIndex("RatingType"); + + b.ToTable("ArcadePlayerRatings"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadePlayerRatingChange", b => + { + b.Property("ArcadePlayerRatingChangeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ArcadePlayerRatingChangeId")); + + b.Property("ArcadePlayerRatingId") + .HasColumnType("int"); + + b.Property("Change10d") + .HasColumnType("float"); + + b.Property("Change24h") + .HasColumnType("float"); + + b.Property("Change30d") + .HasColumnType("float"); + + b.HasKey("ArcadePlayerRatingChangeId"); + + b.HasIndex("ArcadePlayerRatingId") + .IsUnique(); + + b.ToTable("ArcadePlayerRatingChanges"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadeReplay", b => + { + b.Property("ArcadeReplayId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ArcadeReplayId")); + + b.Property("BnetBucketId") + .HasColumnType("bigint"); + + b.Property("BnetRecordId") + .HasColumnType("bigint"); + + b.Property("CreatedAt") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("Duration") + .HasColumnType("int"); + + b.Property("GameMode") + .HasColumnType("int"); + + b.Property("Imported") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("PlayerCount") + .HasColumnType("int"); + + b.Property("RegionId") + .HasColumnType("int"); + + b.Property("ReplayHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TournamentEdition") + .HasColumnType("tinyint(1)"); + + b.Property("WinnerTeam") + .HasColumnType("int"); + + b.HasKey("ArcadeReplayId"); + + b.HasIndex("ReplayHash"); + + b.HasIndex("GameMode", "CreatedAt"); + + b.HasIndex("RegionId", "BnetBucketId", "BnetRecordId") + .IsUnique(); + + b.HasIndex("RegionId", "GameMode", "CreatedAt"); + + b.ToTable("ArcadeReplays"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadeReplayDsPlayer", b => + { + b.Property("ArcadeReplayDsPlayerId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ArcadeReplayDsPlayerId")); + + b.Property("ArcadeReplayId") + .HasColumnType("int"); + + b.Property("Discriminator") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PlayerId") + .HasColumnType("int"); + + b.Property("PlayerResult") + .HasColumnType("int"); + + b.Property("SlotNumber") + .HasColumnType("int"); + + b.Property("Team") + .HasColumnType("int"); + + b.HasKey("ArcadeReplayDsPlayerId"); + + b.HasIndex("ArcadeReplayId"); + + b.HasIndex("PlayerId"); + + b.ToTable("ArcadeReplayDsPlayers"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadeReplayDsPlayerRating", b => + { + b.Property("ArcadeReplayDsPlayerRatingId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ArcadeReplayDsPlayerRatingId")); + + b.Property("ArcadeReplayDsPlayerId") + .HasColumnType("int"); + + b.Property("ArcadeReplayRatingId") + .HasColumnType("int"); + + b.Property("Confidence") + .HasColumnType("float"); + + b.Property("Consistency") + .HasColumnType("float"); + + b.Property("GamePos") + .HasColumnType("int"); + + b.Property("Games") + .HasColumnType("int"); + + b.Property("Rating") + .HasColumnType("float"); + + b.Property("RatingChange") + .HasColumnType("float"); + + b.HasKey("ArcadeReplayDsPlayerRatingId"); + + b.HasIndex("ArcadeReplayDsPlayerId") + .IsUnique(); + + b.HasIndex("ArcadeReplayRatingId"); + + b.ToTable("ArcadeReplayDsPlayerRatings"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadeReplayRating", b => + { + b.Property("ArcadeReplayRatingId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ArcadeReplayRatingId")); + + b.Property("ArcadeReplayId") + .HasColumnType("int"); + + b.Property("AvgRating") + .HasColumnType("int"); + + b.Property("ExpectationToWin") + .HasColumnType("float"); + + b.Property("LeaverType") + .HasColumnType("int"); + + b.Property("RatingType") + .HasColumnType("int"); + + b.HasKey("ArcadeReplayRatingId"); + + b.HasIndex("ArcadeReplayId") + .IsUnique(); + + b.ToTable("ArcadeReplayRatings"); + }); + + modelBuilder.Entity("dsstats.db8.BattleNetInfo", b => + { + b.Property("BattleNetInfoId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("BattleNetInfoId")); + + b.Property("BattleNetId") + .HasColumnType("int"); + + b.Property("UploaderId") + .HasColumnType("int"); + + b.HasKey("BattleNetInfoId"); + + b.HasIndex("UploaderId"); + + b.ToTable("BattleNetInfos"); + }); + + modelBuilder.Entity("dsstats.db8.BonusDamage", b => + { + b.Property("BonusDamageId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("BonusDamageId")); + + b.Property("Damage") + .HasColumnType("int"); + + b.Property("DsWeaponId") + .HasColumnType("int"); + + b.Property("PerUpgrade") + .HasColumnType("int"); + + b.Property("UnitType") + .HasColumnType("int"); + + b.HasKey("BonusDamageId"); + + b.HasIndex("DsWeaponId"); + + b.HasIndex("UnitType"); + + b.ToTable("BonusDamages"); + }); + + modelBuilder.Entity("dsstats.db8.Challenge.SpChallenge", b => + { + b.Property("SpChallengeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SpChallengeId")); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ArmyValue") + .HasColumnType("int"); + + b.Property("Base64Image") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Commander") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("Desc") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("Fen") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("GameMode") + .HasColumnType("int"); + + b.Property("Time") + .HasColumnType("int"); + + b.Property("WinnerPlayerId") + .HasColumnType("int"); + + b.HasKey("SpChallengeId"); + + b.HasIndex("WinnerPlayerId"); + + b.ToTable("SpChallenges"); + }); + + modelBuilder.Entity("dsstats.db8.Challenge.SpChallengeSubmission", b => + { + b.Property("SpChallengeSubmissionId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SpChallengeSubmissionId")); + + b.Property("Commander") + .HasColumnType("int"); + + b.Property("Fen") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("GameTime") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("PlayerId") + .HasColumnType("int"); + + b.Property("SpChallengeId") + .HasColumnType("int"); + + b.Property("Submitted") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("Time") + .HasColumnType("int"); + + b.HasKey("SpChallengeSubmissionId"); + + b.HasIndex("PlayerId"); + + b.HasIndex("SpChallengeId"); + + b.ToTable("SpChallengeSubmissions"); + }); + + modelBuilder.Entity("dsstats.db8.ComboPlayerRating", b => + { + b.Property("ComboPlayerRatingId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ComboPlayerRatingId")); + + b.Property("Confidence") + .HasColumnType("double"); + + b.Property("Consistency") + .HasColumnType("double"); + + b.Property("Games") + .HasColumnType("int"); + + b.Property("PlayerId") + .HasColumnType("int"); + + b.Property("Pos") + .HasColumnType("int"); + + b.Property("Rating") + .HasColumnType("double"); + + b.Property("RatingType") + .HasColumnType("int"); + + b.Property("Wins") + .HasColumnType("int"); + + b.HasKey("ComboPlayerRatingId"); + + b.HasIndex("PlayerId"); + + b.HasIndex("RatingType"); + + b.ToTable("ComboPlayerRatings"); + }); + + modelBuilder.Entity("dsstats.db8.ComboReplayPlayerRating", b => + { + b.Property("ComboReplayPlayerRatingId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ComboReplayPlayerRatingId")); + + b.Property("Change") + .HasPrecision(5, 2) + .HasColumnType("double"); + + b.Property("Confidence") + .HasPrecision(5, 2) + .HasColumnType("double"); + + b.Property("Consistency") + .HasPrecision(5, 2) + .HasColumnType("double"); + + b.Property("GamePos") + .HasColumnType("int"); + + b.Property("Games") + .HasColumnType("int"); + + b.Property("Rating") + .HasColumnType("int"); + + b.Property("ReplayPlayerId") + .HasColumnType("int"); + + b.HasKey("ComboReplayPlayerRatingId"); + + b.HasIndex("ReplayPlayerId") + .IsUnique(); + + b.ToTable("ComboReplayPlayerRatings"); + }); + + modelBuilder.Entity("dsstats.db8.ComboReplayRating", b => + { + b.Property("ComboReplayRatingId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ComboReplayRatingId")); + + b.Property("AvgRating") + .HasColumnType("int"); + + b.Property("ExpectationToWin") + .HasPrecision(5, 2) + .HasColumnType("double"); + + b.Property("IsPreRating") + .HasColumnType("tinyint(1)"); + + b.Property("LeaverType") + .HasColumnType("int"); + + b.Property("RatingType") + .HasColumnType("int"); + + b.Property("ReplayId") + .HasColumnType("int"); + + b.HasKey("ComboReplayRatingId"); + + b.HasIndex("RatingType"); + + b.HasIndex("ReplayId") + .IsUnique(); + + b.ToTable("ComboReplayRatings"); + }); + + modelBuilder.Entity("dsstats.db8.CommanderMmr", b => + { + b.Property("CommanderMmrId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CommanderMmrId")); + + b.Property("AntiSynergyMmr") + .HasColumnType("double"); + + b.Property("OppRace") + .HasColumnType("int"); + + b.Property("Race") + .HasColumnType("int"); + + b.Property("SynergyMmr") + .HasColumnType("double"); + + b.HasKey("CommanderMmrId"); + + b.HasIndex("Race", "OppRace"); + + b.ToTable("CommanderMmrs"); + }); + + modelBuilder.Entity("dsstats.db8.DsAbility", b => + { + b.Property("DsAbilityId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DsAbilityId")); + + b.Property("AbilityTarget") + .HasColumnType("int"); + + b.Property("AoeRadius") + .HasColumnType("float"); + + b.Property("CastRange") + .HasColumnType("int"); + + b.Property("Commander") + .HasColumnType("int"); + + b.Property("Cooldown") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(310) + .HasColumnType("varchar(310)"); + + b.Property("EnergyCost") + .HasColumnType("float"); + + b.Property("GlobalTimer") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Requirements") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("DsAbilityId"); + + b.HasIndex("Name"); + + b.ToTable("DsAbilities"); + }); + + modelBuilder.Entity("dsstats.db8.DsPickBan", b => + { + b.Property("DsPickBanId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DsPickBanId")); + + b.Property("Bans") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("PickBanMode") + .HasColumnType("int"); + + b.Property("Picks") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Time") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.HasKey("DsPickBanId"); + + b.ToTable("DsPickBans"); + }); + + modelBuilder.Entity("dsstats.db8.DsUnit", b => + { + b.Property("DsUnitId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DsUnitId")); + + b.Property("Armor") + .HasColumnType("int"); + + b.Property("Color") + .HasColumnType("int"); + + b.Property("Commander") + .HasColumnType("int"); + + b.Property("Cost") + .HasColumnType("int"); + + b.Property("EnergyRegen") + .HasColumnType("float"); + + b.Property("HealthRegen") + .HasColumnType("float"); + + b.Property("Life") + .HasColumnType("int"); + + b.Property("MaxEnergy") + .HasColumnType("int"); + + b.Property("MovementType") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ShieldArmor") + .HasColumnType("int"); + + b.Property("Shields") + .HasColumnType("int"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Speed") + .HasColumnType("float"); + + b.Property("StartingEnergy") + .HasColumnType("int"); + + b.Property("Tier") + .HasColumnType("int"); + + b.Property("UnitId") + .HasColumnType("int"); + + b.Property("UnitType") + .HasColumnType("int"); + + b.HasKey("DsUnitId"); + + b.HasIndex("Commander"); + + b.HasIndex("Name"); + + b.HasIndex("Name", "Commander"); + + b.ToTable("DsUnits"); + }); + + modelBuilder.Entity("dsstats.db8.DsUpdate", b => + { + b.Property("DsUpdateId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DsUpdateId")); + + b.Property("Change") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Commander") + .HasColumnType("int"); + + b.Property("DiscordId") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Time") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.HasKey("DsUpdateId"); + + b.HasIndex("Time"); + + b.ToTable("DsUpdates"); + }); + + modelBuilder.Entity("dsstats.db8.DsUpgrade", b => + { + b.Property("DsUpgradeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DsUpgradeId")); + + b.Property("Commander") + .HasColumnType("int"); + + b.Property("Cost") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("DsUnitId") + .HasColumnType("int"); + + b.Property("RequiredTier") + .HasColumnType("int"); + + b.Property("Upgrade") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("DsUpgradeId"); + + b.HasIndex("DsUnitId"); + + b.HasIndex("Upgrade"); + + b.ToTable("DsUpgrades"); + }); + + modelBuilder.Entity("dsstats.db8.DsWeapon", b => + { + b.Property("DsWeaponId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DsWeaponId")); + + b.Property("AttackSpeed") + .HasColumnType("float"); + + b.Property("Attacks") + .HasColumnType("int"); + + b.Property("CanTarget") + .HasColumnType("int"); + + b.Property("Damage") + .HasColumnType("int"); + + b.Property("DamagePerUpgrade") + .HasColumnType("int"); + + b.Property("DsUnitId") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Range") + .HasColumnType("float"); + + b.HasKey("DsWeaponId"); + + b.HasIndex("DsUnitId"); + + b.ToTable("DsWeapons"); + }); + + modelBuilder.Entity("dsstats.db8.Event", b => + { + b.Property("EventId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("EventId")); + + b.Property("EventGuid") + .HasColumnType("char(36)"); + + b.Property("EventStart") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("ExternalLink") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("GameMode") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("WinnerTeam") + .HasColumnType("longtext"); + + b.HasKey("EventId"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Events"); + }); + + modelBuilder.Entity("dsstats.db8.Faq", b => + { + b.Property("FaqId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("FaqId")); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("CreatedAt") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("CreatedBy") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Question") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("UpdatedAt") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("Upvotes") + .HasColumnType("int"); + + b.HasKey("FaqId"); + + b.HasIndex("Question"); + + b.ToTable("Faqs"); + }); + + modelBuilder.Entity("dsstats.db8.FaqVote", b => + { + b.Property("FaqVoteId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("FaqVoteId")); + + b.Property("FaqId") + .HasColumnType("int"); + + b.HasKey("FaqVoteId"); + + b.ToTable("FaqVotes"); + }); + + modelBuilder.Entity("dsstats.db8.FunStatsMemory", b => + { + b.Property("FunStatsMemoryId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("FunStatsMemoryId")); + + b.Property("AvgGameDuration") + .HasColumnType("int"); + + b.Property("Created") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("FirstReplay") + .HasColumnType("longtext"); + + b.Property("GreatestArmyReplay") + .HasColumnType("longtext"); + + b.Property("GreatestComebackReplay") + .HasColumnType("longtext"); + + b.Property("MostCompetitiveReplay") + .HasColumnType("longtext"); + + b.Property("MostUpgradesReplay") + .HasColumnType("longtext"); + + b.Property("RatingType") + .HasColumnType("int"); + + b.Property("TimePeriod") + .HasColumnType("int"); + + b.Property("TotalTimePlayed") + .HasColumnType("bigint"); + + b.Property("UnitCountLeast") + .HasColumnType("int"); + + b.Property("UnitCountMost") + .HasColumnType("int"); + + b.Property("UnitNameLeast") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UnitNameMost") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("FunStatsMemoryId"); + + b.ToTable("FunStatMemories"); + }); + + modelBuilder.Entity("dsstats.db8.GroupByHelper", b => + { + b.Property("Count") + .HasColumnType("int"); + + b.Property("Group") + .HasColumnType("tinyint(1)") + .HasColumnName("Name"); + + b.ToTable((string)null); + + b.ToView("GroupByHelper", (string)null); + }); + + modelBuilder.Entity("dsstats.db8.IhSession", b => + { + b.Property("IhSessionId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("IhSessionId")); + + b.Property("Closed") + .HasColumnType("tinyint(1)"); + + b.Property("Created") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("Games") + .HasColumnType("int"); + + b.Property("GroupId") + .HasColumnType("char(36)"); + + b.Property("GroupState") + .HasColumnType("longtext"); + + b.Property("GroupStateV2") + .HasColumnType("longtext"); + + b.Property("Players") + .HasColumnType("int"); + + b.Property("RatingType") + .HasColumnType("int"); + + b.HasKey("IhSessionId"); + + b.HasIndex("GroupId") + .IsUnique(); + + b.ToTable("IhSessions"); + }); + + modelBuilder.Entity("dsstats.db8.IhSessionPlayer", b => + { + b.Property("IhSessionPlayerId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("IhSessionPlayerId")); + + b.Property("Games") + .HasColumnType("int"); + + b.Property("IhSessionId") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Obs") + .HasColumnType("int"); + + b.Property("Performance") + .HasColumnType("int"); + + b.Property("PlayerId") + .HasColumnType("int"); + + b.Property("RatingEnd") + .HasColumnType("int"); + + b.Property("RatingStart") + .HasColumnType("int"); + + b.Property("Wins") + .HasColumnType("int"); + + b.HasKey("IhSessionPlayerId"); + + b.HasIndex("IhSessionId"); + + b.HasIndex("PlayerId"); + + b.ToTable("IhSessionPlayers"); + }); + + modelBuilder.Entity("dsstats.db8.MaterializedArcadeReplay", b => + { + b.Property("MaterializedArcadeReplayId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("MaterializedArcadeReplayId")); + + b.Property("ArcadeReplayId") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("Duration") + .HasColumnType("int"); + + b.Property("GameMode") + .HasColumnType("int"); + + b.Property("WinnerTeam") + .HasColumnType("int"); + + b.HasKey("MaterializedArcadeReplayId"); + + b.HasIndex("CreatedAt"); + + b.ToTable("MaterializedArcadeReplays"); + }); + + modelBuilder.Entity("dsstats.db8.NoUploadResult", b => + { + b.Property("NoUploadResultId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("NoUploadResultId")); + + b.Property("Created") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("LatestNoUpload") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("LatestReplay") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("LatestUpload") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("NoUploadDefeats") + .HasColumnType("int"); + + b.Property("NoUploadTotal") + .HasColumnType("int"); + + b.Property("PlayerId") + .HasColumnType("int"); + + b.Property("TotalReplays") + .HasColumnType("int"); + + b.HasKey("NoUploadResultId"); + + b.HasIndex("PlayerId"); + + b.ToTable("NoUploadResults"); + }); + + modelBuilder.Entity("dsstats.db8.Player", b => + { + b.Property("PlayerId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PlayerId")); + + b.Property("ArcadeDefeatsSinceLastUpload") + .HasColumnType("int"); + + b.Property("DisconnectCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("NotUploadCount") + .HasColumnType("int"); + + b.Property("RageQuitCount") + .HasColumnType("int"); + + b.Property("RealmId") + .HasColumnType("int"); + + b.Property("RegionId") + .HasColumnType("int"); + + b.Property("ToonId") + .HasColumnType("int"); + + b.Property("UploaderId") + .HasColumnType("int"); + + b.HasKey("PlayerId"); + + b.HasIndex("UploaderId"); + + b.HasIndex("RegionId", "RealmId", "ToonId") + .IsUnique(); + + b.ToTable("Players"); + }); + + modelBuilder.Entity("dsstats.db8.PlayerRating", b => + { + b.Property("PlayerRatingId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PlayerRatingId")); + + b.Property("ArcadeDefeatsSinceLastUpload") + .HasColumnType("int"); + + b.Property("Confidence") + .HasColumnType("double"); + + b.Property("Consistency") + .HasColumnType("double"); + + b.Property("Games") + .HasColumnType("int"); + + b.Property("IsUploader") + .HasColumnType("tinyint(1)"); + + b.Property("Main") + .HasColumnType("int"); + + b.Property("MainCount") + .HasColumnType("int"); + + b.Property("Mvp") + .HasColumnType("int"); + + b.Property("PlayerId") + .HasColumnType("int"); + + b.Property("Pos") + .HasColumnType("int"); + + b.Property("Rating") + .HasColumnType("double"); + + b.Property("RatingType") + .HasColumnType("int"); + + b.Property("TeamGames") + .HasColumnType("int"); + + b.Property("Wins") + .HasColumnType("int"); + + b.HasKey("PlayerRatingId"); + + b.HasIndex("PlayerId"); + + b.HasIndex("RatingType"); + + b.ToTable("PlayerRatings"); + }); + + modelBuilder.Entity("dsstats.db8.PlayerRatingChange", b => + { + b.Property("PlayerRatingChangeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PlayerRatingChangeId")); + + b.Property("Change10d") + .HasColumnType("float"); + + b.Property("Change24h") + .HasColumnType("float"); + + b.Property("Change30d") + .HasColumnType("float"); + + b.Property("PlayerRatingId") + .HasColumnType("int"); + + b.HasKey("PlayerRatingChangeId"); + + b.HasIndex("PlayerRatingId") + .IsUnique(); + + b.ToTable("PlayerRatingChanges"); + }); + + modelBuilder.Entity("dsstats.db8.PlayerUpgrade", b => + { + b.Property("PlayerUpgradeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PlayerUpgradeId")); + + b.Property("Gameloop") + .HasColumnType("int"); + + b.Property("ReplayPlayerId") + .HasColumnType("int"); + + b.Property("UpgradeId") + .HasColumnType("int"); + + b.HasKey("PlayerUpgradeId"); + + b.HasIndex("ReplayPlayerId"); + + b.HasIndex("UpgradeId"); + + b.ToTable("PlayerUpgrades"); + }); + + modelBuilder.Entity("dsstats.db8.RepPlayerRating", b => + { + b.Property("RepPlayerRatingId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("RepPlayerRatingId")); + + b.Property("Confidence") + .HasColumnType("float"); + + b.Property("Consistency") + .HasColumnType("float"); + + b.Property("GamePos") + .HasColumnType("int"); + + b.Property("Games") + .HasColumnType("int"); + + b.Property("Rating") + .HasColumnType("float"); + + b.Property("RatingChange") + .HasColumnType("float"); + + b.Property("ReplayPlayerId") + .HasColumnType("int"); + + b.Property("ReplayRatingInfoId") + .HasColumnType("int"); + + b.HasKey("RepPlayerRatingId"); + + b.HasIndex("ReplayPlayerId") + .IsUnique(); + + b.HasIndex("ReplayRatingInfoId"); + + b.ToTable("RepPlayerRatings"); + }); + + modelBuilder.Entity("dsstats.db8.Replay", b => + { + b.Property("ReplayId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ReplayId")); + + b.Property("Bunker") + .HasColumnType("int"); + + b.Property("Cannon") + .HasColumnType("int"); + + b.Property("CommandersTeam1") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("CommandersTeam2") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DefaultFilter") + .HasColumnType("tinyint(1)"); + + b.Property("Downloads") + .HasColumnType("int"); + + b.Property("Duration") + .HasColumnType("int"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("GameMode") + .HasColumnType("int"); + + b.Property("GameTime") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("Imported") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("Maxkillsum") + .HasColumnType("int"); + + b.Property("Maxleaver") + .HasColumnType("int"); + + b.Property("Middle") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("varchar(4000)"); + + b.Property("Minarmy") + .HasColumnType("int"); + + b.Property("Minincome") + .HasColumnType("int"); + + b.Property("Minkillsum") + .HasColumnType("int"); + + b.Property("Objective") + .HasColumnType("int"); + + b.Property("PlayerPos") + .HasColumnType("int"); + + b.Property("PlayerResult") + .HasColumnType("int"); + + b.Property("Playercount") + .HasColumnType("tinyint unsigned"); + + b.Property("ReplayEventId") + .HasColumnType("int"); + + b.Property("ReplayHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("char(64)") + .IsFixedLength(); + + b.Property("ResultCorrected") + .HasColumnType("tinyint(1)"); + + b.Property("TournamentEdition") + .HasColumnType("tinyint(1)"); + + b.Property("Uploaded") + .HasColumnType("tinyint(1)"); + + b.Property("Views") + .HasColumnType("int"); + + b.Property("WinnerTeam") + .HasColumnType("int"); + + b.HasKey("ReplayId"); + + b.HasIndex("FileName"); + + b.HasIndex("GameTime"); + + b.HasIndex("Imported"); + + b.HasIndex("Maxkillsum"); + + b.HasIndex("ReplayEventId"); + + b.HasIndex("ReplayHash") + .IsUnique(); + + b.HasIndex("GameTime", "GameMode"); + + b.HasIndex("GameTime", "GameMode", "DefaultFilter"); + + b.HasIndex("GameTime", "GameMode", "Maxleaver"); + + b.HasIndex("GameTime", "GameMode", "WinnerTeam"); + + b.ToTable("Replays"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayArcadeMatch", b => + { + b.Property("ReplayArcadeMatchId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ReplayArcadeMatchId")); + + b.Property("ArcadeReplayId") + .HasColumnType("int"); + + b.Property("MatchTime") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("ReplayId") + .HasColumnType("int"); + + b.HasKey("ReplayArcadeMatchId"); + + b.HasIndex("ArcadeReplayId") + .IsUnique(); + + b.HasIndex("MatchTime"); + + b.HasIndex("ReplayId") + .IsUnique(); + + b.ToTable("ReplayArcadeMatches"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayDownloadCount", b => + { + b.Property("ReplayDownloadCountId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ReplayDownloadCountId")); + + b.Property("ReplayHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("ReplayDownloadCountId"); + + b.ToTable("ReplayDownloadCounts"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayEvent", b => + { + b.Property("ReplayEventId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ReplayEventId")); + + b.Property("Ban1") + .HasColumnType("int"); + + b.Property("Ban2") + .HasColumnType("int"); + + b.Property("Ban3") + .HasColumnType("int"); + + b.Property("Ban4") + .HasColumnType("int"); + + b.Property("Ban5") + .HasColumnType("int"); + + b.Property("EventId") + .HasColumnType("int"); + + b.Property("Round") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("RunnerTeam") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("WinnerTeam") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ReplayEventId"); + + b.HasIndex("EventId"); + + b.ToTable("ReplayEvents"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayPlayer", b => + { + b.Property("ReplayPlayerId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ReplayPlayerId")); + + b.Property("APM") + .HasColumnType("int"); + + b.Property("Army") + .HasColumnType("int"); + + b.Property("Clan") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("DidNotUpload") + .HasColumnType("tinyint(1)"); + + b.Property("Downloads") + .HasColumnType("int"); + + b.Property("Duration") + .HasColumnType("int"); + + b.Property("GamePos") + .HasColumnType("int"); + + b.Property("Income") + .HasColumnType("int"); + + b.Property("IsLeaver") + .HasColumnType("tinyint(1)"); + + b.Property("IsUploader") + .HasColumnType("tinyint(1)"); + + b.Property("Kills") + .HasColumnType("int"); + + b.Property("LastSpawnHash") + .HasMaxLength(64) + .HasColumnType("char(64)") + .IsFixedLength(); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("OppRace") + .HasColumnType("int"); + + b.Property("PlayerId") + .HasColumnType("int"); + + b.Property("PlayerResult") + .HasColumnType("int"); + + b.Property("Race") + .HasColumnType("int"); + + b.Property("Refineries") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("ReplayId") + .HasColumnType("int"); + + b.Property("Team") + .HasColumnType("int"); + + b.Property("TierUpgrades") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("UpgradeId") + .HasColumnType("int"); + + b.Property("UpgradesSpent") + .HasColumnType("int"); + + b.Property("Views") + .HasColumnType("int"); + + b.HasKey("ReplayPlayerId"); + + b.HasIndex("Kills"); + + b.HasIndex("LastSpawnHash") + .IsUnique(); + + b.HasIndex("Name"); + + b.HasIndex("PlayerId"); + + b.HasIndex("Race"); + + b.HasIndex("ReplayId"); + + b.HasIndex("UpgradeId"); + + b.HasIndex("IsUploader", "Team"); + + b.HasIndex("Race", "OppRace"); + + b.ToTable("ReplayPlayers"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayRating", b => + { + b.Property("ReplayRatingId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ReplayRatingId")); + + b.Property("AvgRating") + .HasColumnType("int"); + + b.Property("ExpectationToWin") + .HasColumnType("float"); + + b.Property("IsPreRating") + .HasColumnType("tinyint(1)"); + + b.Property("LeaverType") + .HasColumnType("int"); + + b.Property("RatingType") + .HasColumnType("int"); + + b.Property("ReplayId") + .HasColumnType("int"); + + b.HasKey("ReplayRatingId"); + + b.HasIndex("RatingType"); + + b.HasIndex("ReplayId") + .IsUnique(); + + b.ToTable("ReplayRatings"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayViewCount", b => + { + b.Property("ReplayViewCountId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ReplayViewCountId")); + + b.Property("ReplayHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("ReplayViewCountId"); + + b.ToTable("ReplayViewCounts"); + }); + + modelBuilder.Entity("dsstats.db8.SkipReplay", b => + { + b.Property("SkipReplayId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SkipReplayId")); + + b.Property("Path") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.HasKey("SkipReplayId"); + + b.ToTable("SkipReplays"); + }); + + modelBuilder.Entity("dsstats.db8.Spawn", b => + { + b.Property("SpawnId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SpawnId")); + + b.Property("ArmyValue") + .HasColumnType("int"); + + b.Property("Breakpoint") + .HasColumnType("int"); + + b.Property("Gameloop") + .HasColumnType("int"); + + b.Property("GasCount") + .HasColumnType("int"); + + b.Property("Income") + .HasColumnType("int"); + + b.Property("KilledValue") + .HasColumnType("int"); + + b.Property("ReplayPlayerId") + .HasColumnType("int"); + + b.Property("UpgradeSpent") + .HasColumnType("int"); + + b.HasKey("SpawnId"); + + b.HasIndex("ReplayPlayerId"); + + b.ToTable("Spawns"); + }); + + modelBuilder.Entity("dsstats.db8.SpawnUnit", b => + { + b.Property("SpawnUnitId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SpawnUnitId")); + + b.Property("Count") + .HasColumnType("tinyint unsigned"); + + b.Property("Poss") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("varchar(4000)"); + + b.Property("SpawnId") + .HasColumnType("int"); + + b.Property("UnitId") + .HasColumnType("int"); + + b.HasKey("SpawnUnitId"); + + b.HasIndex("SpawnId"); + + b.HasIndex("UnitId"); + + b.ToTable("SpawnUnits"); + }); + + modelBuilder.Entity("dsstats.db8.StreakInfo", b => + { + b.Property("LongestStreak") + .HasColumnType("double"); + + b.Property("PlayerResult") + .HasColumnType("int"); + + b.ToTable("StreakInfos"); + }); + + modelBuilder.Entity("dsstats.db8.Unit", b => + { + b.Property("UnitId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UnitId")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("UnitId"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Units"); + }); + + modelBuilder.Entity("dsstats.db8.Upgrade", b => + { + b.Property("UpgradeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UpgradeId")); + + b.Property("Cost") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("UpgradeId"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Upgrades"); + }); + + modelBuilder.Entity("dsstats.db8.Uploader", b => + { + b.Property("UploaderId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UploaderId")); + + b.Property("AppGuid") + .HasColumnType("char(36)"); + + b.Property("AppVersion") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Games") + .HasColumnType("int"); + + b.Property("Identifier") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("LatestReplay") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("LatestUpload") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("MainCommander") + .HasColumnType("int"); + + b.Property("MainCount") + .HasColumnType("int"); + + b.Property("Mvp") + .HasColumnType("int"); + + b.Property("TeamGames") + .HasColumnType("int"); + + b.Property("UploadDisabledCount") + .HasColumnType("int"); + + b.Property("UploadIsDisabled") + .HasColumnType("tinyint(1)"); + + b.Property("UploadLastDisabled") + .HasPrecision(0) + .HasColumnType("datetime(0)"); + + b.Property("Wins") + .HasColumnType("int"); + + b.HasKey("UploaderId"); + + b.HasIndex("AppGuid") + .IsUnique(); + + b.ToTable("Uploaders"); + }); + + modelBuilder.Entity("DsAbilityDsUnit", b => + { + b.HasOne("dsstats.db8.DsAbility", null) + .WithMany() + .HasForeignKey("AbilitiesDsAbilityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.DsUnit", null) + .WithMany() + .HasForeignKey("DsUnitsDsUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReplayUploader", b => + { + b.HasOne("dsstats.db8.Replay", null) + .WithMany() + .HasForeignKey("ReplaysReplayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.Uploader", null) + .WithMany() + .HasForeignKey("UploadersUploaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("dsstats.db8.ArcadePlayerRating", b => + { + b.HasOne("dsstats.db8.Player", "Player") + .WithMany("ArcadePlayerRatings") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadePlayerRatingChange", b => + { + b.HasOne("dsstats.db8.ArcadePlayerRating", "ArcadePlayerRating") + .WithOne("ArcadePlayerRatingChange") + .HasForeignKey("dsstats.db8.ArcadePlayerRatingChange", "ArcadePlayerRatingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ArcadePlayerRating"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadeReplayDsPlayer", b => + { + b.HasOne("dsstats.db8.ArcadeReplay", "ArcadeReplay") + .WithMany("ArcadeReplayDsPlayers") + .HasForeignKey("ArcadeReplayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.Player", "Player") + .WithMany() + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ArcadeReplay"); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadeReplayDsPlayerRating", b => + { + b.HasOne("dsstats.db8.ArcadeReplayDsPlayer", "ReplayDsPlayer") + .WithOne("ArcadeReplayPlayerRating") + .HasForeignKey("dsstats.db8.ArcadeReplayDsPlayerRating", "ArcadeReplayDsPlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.ArcadeReplayRating", "ArcadeReplayRating") + .WithMany("ArcadeReplayDsPlayerRatings") + .HasForeignKey("ArcadeReplayRatingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ArcadeReplayRating"); + + b.Navigation("ReplayDsPlayer"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadeReplayRating", b => + { + b.HasOne("dsstats.db8.ArcadeReplay", "ArcadeReplay") + .WithOne("ArcadeReplayRating") + .HasForeignKey("dsstats.db8.ArcadeReplayRating", "ArcadeReplayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ArcadeReplay"); + }); + + modelBuilder.Entity("dsstats.db8.BattleNetInfo", b => + { + b.HasOne("dsstats.db8.Uploader", "Uploader") + .WithMany("BattleNetInfos") + .HasForeignKey("UploaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Uploader"); + }); + + modelBuilder.Entity("dsstats.db8.BonusDamage", b => + { + b.HasOne("dsstats.db8.DsWeapon", "DsWeapon") + .WithMany("BonusDamages") + .HasForeignKey("DsWeaponId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DsWeapon"); + }); + + modelBuilder.Entity("dsstats.db8.Challenge.SpChallenge", b => + { + b.HasOne("dsstats.db8.Player", "Winner") + .WithMany() + .HasForeignKey("WinnerPlayerId"); + + b.Navigation("Winner"); + }); + + modelBuilder.Entity("dsstats.db8.Challenge.SpChallengeSubmission", b => + { + b.HasOne("dsstats.db8.Player", "Player") + .WithMany() + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.Challenge.SpChallenge", "SpChallenge") + .WithMany("SpChallengeSubmissions") + .HasForeignKey("SpChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + + b.Navigation("SpChallenge"); + }); + + modelBuilder.Entity("dsstats.db8.ComboPlayerRating", b => + { + b.HasOne("dsstats.db8.Player", "Player") + .WithMany() + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("dsstats.db8.ComboReplayPlayerRating", b => + { + b.HasOne("dsstats.db8.ReplayPlayer", "ReplayPlayer") + .WithOne("ComboReplayPlayerRating") + .HasForeignKey("dsstats.db8.ComboReplayPlayerRating", "ReplayPlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ReplayPlayer"); + }); + + modelBuilder.Entity("dsstats.db8.ComboReplayRating", b => + { + b.HasOne("dsstats.db8.Replay", "Replay") + .WithOne("ComboReplayRating") + .HasForeignKey("dsstats.db8.ComboReplayRating", "ReplayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Replay"); + }); + + modelBuilder.Entity("dsstats.db8.DsUpgrade", b => + { + b.HasOne("dsstats.db8.DsUnit", null) + .WithMany("Upgrades") + .HasForeignKey("DsUnitId"); + }); + + modelBuilder.Entity("dsstats.db8.DsWeapon", b => + { + b.HasOne("dsstats.db8.DsUnit", "DsUnit") + .WithMany("Weapons") + .HasForeignKey("DsUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DsUnit"); + }); + + modelBuilder.Entity("dsstats.db8.IhSessionPlayer", b => + { + b.HasOne("dsstats.db8.IhSession", "IhSession") + .WithMany("IhSessionPlayers") + .HasForeignKey("IhSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.Player", "Player") + .WithMany() + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("IhSession"); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("dsstats.db8.NoUploadResult", b => + { + b.HasOne("dsstats.db8.Player", "Player") + .WithMany() + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("dsstats.db8.Player", b => + { + b.HasOne("dsstats.db8.Uploader", "Uploader") + .WithMany("Players") + .HasForeignKey("UploaderId"); + + b.Navigation("Uploader"); + }); + + modelBuilder.Entity("dsstats.db8.PlayerRating", b => + { + b.HasOne("dsstats.db8.Player", "Player") + .WithMany("PlayerRatings") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Player"); + }); + + modelBuilder.Entity("dsstats.db8.PlayerRatingChange", b => + { + b.HasOne("dsstats.db8.PlayerRating", "PlayerRating") + .WithOne("PlayerRatingChange") + .HasForeignKey("dsstats.db8.PlayerRatingChange", "PlayerRatingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PlayerRating"); + }); + + modelBuilder.Entity("dsstats.db8.PlayerUpgrade", b => + { + b.HasOne("dsstats.db8.ReplayPlayer", "ReplayPlayer") + .WithMany("Upgrades") + .HasForeignKey("ReplayPlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.Upgrade", "Upgrade") + .WithMany() + .HasForeignKey("UpgradeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ReplayPlayer"); + + b.Navigation("Upgrade"); + }); + + modelBuilder.Entity("dsstats.db8.RepPlayerRating", b => + { + b.HasOne("dsstats.db8.ReplayPlayer", "ReplayPlayer") + .WithOne("ReplayPlayerRatingInfo") + .HasForeignKey("dsstats.db8.RepPlayerRating", "ReplayPlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.ReplayRating", "ReplayRatingInfo") + .WithMany("RepPlayerRatings") + .HasForeignKey("ReplayRatingInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ReplayPlayer"); + + b.Navigation("ReplayRatingInfo"); + }); + + modelBuilder.Entity("dsstats.db8.Replay", b => + { + b.HasOne("dsstats.db8.ReplayEvent", "ReplayEvent") + .WithMany("Replays") + .HasForeignKey("ReplayEventId"); + + b.Navigation("ReplayEvent"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayEvent", b => + { + b.HasOne("dsstats.db8.Event", "Event") + .WithMany("ReplayEvents") + .HasForeignKey("EventId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Event"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayPlayer", b => + { + b.HasOne("dsstats.db8.Player", "Player") + .WithMany("ReplayPlayers") + .HasForeignKey("PlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.Replay", "Replay") + .WithMany("ReplayPlayers") + .HasForeignKey("ReplayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.Upgrade", null) + .WithMany("ReplayPlayers") + .HasForeignKey("UpgradeId"); + + b.Navigation("Player"); + + b.Navigation("Replay"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayRating", b => + { + b.HasOne("dsstats.db8.Replay", "Replay") + .WithOne("ReplayRatingInfo") + .HasForeignKey("dsstats.db8.ReplayRating", "ReplayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Replay"); + }); + + modelBuilder.Entity("dsstats.db8.Spawn", b => + { + b.HasOne("dsstats.db8.ReplayPlayer", "ReplayPlayer") + .WithMany("Spawns") + .HasForeignKey("ReplayPlayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ReplayPlayer"); + }); + + modelBuilder.Entity("dsstats.db8.SpawnUnit", b => + { + b.HasOne("dsstats.db8.Spawn", "Spawn") + .WithMany("Units") + .HasForeignKey("SpawnId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("dsstats.db8.Unit", "Unit") + .WithMany() + .HasForeignKey("UnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Spawn"); + + b.Navigation("Unit"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadePlayerRating", b => + { + b.Navigation("ArcadePlayerRatingChange"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadeReplay", b => + { + b.Navigation("ArcadeReplayDsPlayers"); + + b.Navigation("ArcadeReplayRating"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadeReplayDsPlayer", b => + { + b.Navigation("ArcadeReplayPlayerRating"); + }); + + modelBuilder.Entity("dsstats.db8.ArcadeReplayRating", b => + { + b.Navigation("ArcadeReplayDsPlayerRatings"); + }); + + modelBuilder.Entity("dsstats.db8.Challenge.SpChallenge", b => + { + b.Navigation("SpChallengeSubmissions"); + }); + + modelBuilder.Entity("dsstats.db8.DsUnit", b => + { + b.Navigation("Upgrades"); + + b.Navigation("Weapons"); + }); + + modelBuilder.Entity("dsstats.db8.DsWeapon", b => + { + b.Navigation("BonusDamages"); + }); + + modelBuilder.Entity("dsstats.db8.Event", b => + { + b.Navigation("ReplayEvents"); + }); + + modelBuilder.Entity("dsstats.db8.IhSession", b => + { + b.Navigation("IhSessionPlayers"); + }); + + modelBuilder.Entity("dsstats.db8.Player", b => + { + b.Navigation("ArcadePlayerRatings"); + + b.Navigation("PlayerRatings"); + + b.Navigation("ReplayPlayers"); + }); + + modelBuilder.Entity("dsstats.db8.PlayerRating", b => + { + b.Navigation("PlayerRatingChange"); + }); + + modelBuilder.Entity("dsstats.db8.Replay", b => + { + b.Navigation("ComboReplayRating"); + + b.Navigation("ReplayPlayers"); + + b.Navigation("ReplayRatingInfo"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayEvent", b => + { + b.Navigation("Replays"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayPlayer", b => + { + b.Navigation("ComboReplayPlayerRating"); + + b.Navigation("ReplayPlayerRatingInfo"); + + b.Navigation("Spawns"); + + b.Navigation("Upgrades"); + }); + + modelBuilder.Entity("dsstats.db8.ReplayRating", b => + { + b.Navigation("RepPlayerRatings"); + }); + + modelBuilder.Entity("dsstats.db8.Spawn", b => + { + b.Navigation("Units"); + }); + + modelBuilder.Entity("dsstats.db8.Upgrade", b => + { + b.Navigation("ReplayPlayers"); + }); + + modelBuilder.Entity("dsstats.db8.Uploader", b => + { + b.Navigation("BattleNetInfos"); + + b.Navigation("Players"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/MysqlMigrations/Migrations/20250906052847_Patch250905.cs b/src/MysqlMigrations/Migrations/20250906052847_Patch250905.cs new file mode 100644 index 00000000..7644e884 --- /dev/null +++ b/src/MysqlMigrations/Migrations/20250906052847_Patch250905.cs @@ -0,0 +1,193 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using static Microsoft.EntityFrameworkCore.DbLoggerCategory; + +#nullable disable + +namespace MysqlMigrations.Migrations +{ + /// + public partial class Patch250905 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + var sql1 = @"INSERT INTO DsUpdates (`Commander`, `Time`, `DiscordId`, `Change`) VALUES + -- Han & Horner (Commander = 60) + (60, '2025-09-06', 0, '- Weapon reduced from 150/225/300 -> 125/200/250'), + (60, '2025-09-06', 0, '- Deimos Viking reduced from 370 -> 360'), + (60, '2025-09-06', 0, '- Asteria Wraith reduced from 330 -> 325'), + (60, '2025-09-06', 0, '- Assault Galleon reduced from 450 -> 440'), + (60, '2025-09-06', 0, '- Theia Raven reduced from 125 -> 120'), + (60, '2025-09-06', 0, '- Mag Mine: Cooldown increased from 360 -> 420'), + (60, '2025-09-06', 0, '- Drone Hanger reduced from 125 -> 100'), + (60, '2025-09-06', 0, '- Call in the Fleet: Cooldown reduced from 360 -> 300'), + (60, '2025-09-06', 0, '- Strike Fighter: Range increased from 6 -> 7'), + + -- Karax (Commander = 70) + (70, '2025-09-06', 0, '- Ground Weapons reduced from 150/200/250 -> 125/175/225'), + (70, '2025-09-06', 0, '- Shields reduced from 125/175/225 -> 100/150/200'), + (70, '2025-09-06', 0, '- Air Weapons reduced from 125/175/225 -> 100/150/200'), + (70, '2025-09-06', 0, '- Air Armor reduced from 125/175/225 -> 100/150/200'), + (70, '2025-09-06', 0, '- Energizer reduced from 140 -> 135'), + (70, '2025-09-06', 0, '- Mirage reduced from 145 -> 140'), + (70, '2025-09-06', 0, '- Orbital Beacon: Cooldown reduced from 225 -> 200 seconds'), + (70, '2025-09-06', 0, '- Sentinel reduced from 90 -> 85'), + (70, '2025-09-06', 0, '- Annihilator reduced from 260 -> 255'), + + -- Raynor (Commander = 110) + (110, '2025-09-06', 0, '- Dusk Wing reduced from 200 -> 190'), + (110, '2025-09-06', 0, '- Viking reduced from 205 -> 200'), + (110, '2025-09-06', 0, '- Siege Tank reduced from 240 -> 235'), + (110, '2025-09-06', 0, '- Banshee reduced from 180 -> 175'), + (110, '2025-09-06', 0, '- Battlecruiser increased from 460 -> 465'), + (110, '2025-09-06', 0, '- Hyperion reduced from 1950 -> 1900'), + (110, '2025-09-06', 0, '- Hyperion Yamato Cannon: Cooldown reduced from 300 -> 240'), + (110, '2025-09-06', 0, '- Vehicle & Ship Weapons reduced from 150/200/250 -> 125/175/225'), + (110, '2025-09-06', 0, '- Vehicle & Ship Plating reduced from 125/150/200 -> 100/125/175'), + (110, '2025-09-06', 0, '- Cloaking Field (Banshee Cloak) reduced from 125 -> 100'), + (110, '2025-09-06', 0, '- Shockwave Missile Battery (Banshee AoE) reduced from 150 -> 125'), + (110, '2025-09-06', 0, '- Phobos Weapon System (Viking Range) reduced from 125 -> 100'), + (110, '2025-09-06', 0, '- Ripwave Missiles (Viking AoE) reduced from 100 -> 75'), + (110, '2025-09-06', 0, '- Advanced Siege Tech (Tank Transform Speed & Armor) reduced from 100 -> 75'), + (110, '2025-09-06', 0, '- Advanced Targeting System (Hyperion Attack Aura) reduced from 200 -> 150'), + + -- Zagara (Commander = 170) + (170, '2025-09-06', 0, '- Aberration reduced from 350 -> 340'), + (170, '2025-09-06', 0, '- Scourge reduced from 65 -> 60'), + (170, '2025-09-06', 0, '- Corruptor reduced from 200 -> 190'), + (170, '2025-09-06', 0, '- Zagara (Hero) reduced from 250 -> 225'), + (170, '2025-09-06', 0, '- Queens reduced from 140 -> 135'), + (170, '2025-09-06', 0, '- Swarmling reduced from 18 -> 17'), + (170, '2025-09-06', 0, '- Melee Weapons reduced from 150/225/300 -> 125/200/275'), + (170, '2025-09-06', 0, '- Medusa Blades (Zagara Multi-Hit Upgrade): Now Tier 1'), + (170, '2025-09-06', 0, '- Broodmother (Extra Banelings on Ability): Now Tier 1'), + + -- Abathur (Commander = 10) + (10, '2025-09-06', 0, '- Swarm Queen reduced from 115 -> 110'), + (10, '2025-09-06', 0, '- Vile Roach reduced from 80 -> 75'), + (10, '2025-09-06', 0, '- Ravager increased from 225 -> 240'), + (10, '2025-09-06', 0, '- Guardian reduced from 225 -> 220'), + (10, '2025-09-06', 0, '- Brutalisk reduced from 650 -> 625'), + (10, '2025-09-06', 0, '- Leviathan reduced from 825 -> 800'), + + -- Nova (Commander = 100) + (100, '2025-09-06', 0, '- Defensive Drone: Charge cooldown increased from 120 -> 150'), + + -- Mengsk (Commander = 90) + (90, '2025-09-06', 0, '- Pride of Augustgrad increased from 1400 -> 1450'), + + -- Swann (Commander = 140) + (140, '2025-09-06', 0, '- Drakken Laser Drill reduced from 175 -> 150'), + (140, '2025-09-06', 0, '- Siege Tank reduced from 240 -> 235'), + + -- Stukov (Commander = 130) + (130, '2025-09-06', 0, '- Crash Landing reduced from 350 -> 300'), + (130, '2025-09-06', 0, '- Aleksander reduced from 1500 -> 1450'), + + -- Dehaka (Commander = 40) + (40, '2025-09-06', 0, '- Impaler reduced from 440 -> 430'), + (40, '2025-09-06', 0, '- Primal Host reduced from 285 -> 275'), + (40, '2025-09-06', 0, '- Primal Ultralisk reduced from 290 -> 280'), + (40, '2025-09-06', 0, '- Creeper Host reduced from 510 -> 500'), + (40, '2025-09-06', 0, '- Primal Hydralisk reduced from 95 -> 90'), + (40, '2025-09-06', 0, '- Ravasaur reduced from 90 -> 85'), + (40, '2025-09-06', 0, '- Primal Zergling reduced from 45 -> 40'), + (40, '2025-09-06', 0, '- Dehaka (Hero) reduced from 400 -> 350'), + + -- Stetmann (Commander = 120) + (120, '2025-09-06', 0, '- Mecha Battle Carrier Lord reduced from 725 -> 700'), + (120, '2025-09-06', 0, '- Mecha Lurker increased from 400 -> 415'), + (120, '2025-09-06', 0, '- Mecha Ultralisk: Stun duration reduced from 2s -> 1.5s'); + "; + migrationBuilder.Sql(sql1); + + var sql2 = @" + -- Han & Horner + UPDATE DsUnits SET Cost = 360 WHERE Commander = 60 and Name = 'Deimos Viking'; + UPDATE DsUnits SET Cost = 325 WHERE Commander = 60 and Name = 'Asteria Wraith'; + UPDATE DsUnits SET Cost = 440 WHERE Commander = 60 and Name = 'Assault Galleon'; + UPDATE DsUnits SET Cost = 120 WHERE Commander = 60 and Name = 'Theia Raven'; + UPDATE DsUpgrades SET Cost = 100 WHERE Commander = 60 and Upgrade = 'Drone Hanger'; + + -- Karax + UPDATE DsUnits SET Cost = 135 WHERE Commander = 70 and Name = 'Energizer'; + UPDATE DsUnits SET Cost = 140 WHERE Commander = 70 and Name = 'Mirage'; + UPDATE DsUnits SET Cost = 85 WHERE Commander = 70 and Name = 'Sentinel'; + UPDATE DsUnits SET Cost = 255 WHERE Commander = 70 and Name = 'Annihilator'; + + -- Raynor + UPDATE DsUnits SET Cost = 190 WHERE Commander = 110 and Name = 'Dusk Wing'; + UPDATE DsUnits SET Cost = 200 WHERE Commander = 110 and Name = 'Viking'; + UPDATE DsUnits SET Cost = 235 WHERE Commander = 110 and Name = 'Siege Tank'; + UPDATE DsUnits SET Cost = 175 WHERE Commander = 110 and Name = 'Banshee'; + UPDATE DsUnits SET Cost = 465 WHERE Commander = 110 and Name = 'Battlecruiser'; + UPDATE DsUnits SET Cost = 1900 WHERE Commander = 110 and Name = 'Hyperion'; + UPDATE DsUpgrades SET Cost = 100 WHERE Commander = 110 and Upgrade = 'Cloaking Field'; + UPDATE DsUpgrades SET Cost = 125 WHERE Commander = 110 and Upgrade = 'Shockwave Missile Battery'; + UPDATE DsUpgrades SET Cost = 100 WHERE Commander = 110 and Upgrade = 'Phobos Weapon System'; + UPDATE DsUpgrades SET Cost = 75 WHERE Commander = 110 and Upgrade = 'Ripwave Missiles'; + UPDATE DsUpgrades SET Cost = 75 WHERE Commander = 110 and Upgrade = 'Advanced Siege Tech'; + UPDATE DsUpgrades SET Cost = 150 WHERE Commander = 110 and Upgrade = 'Advanced Targeting System'; + + -- Zagara + UPDATE DsUnits SET Cost = 340 WHERE Commander = 170 and Name = 'Aberration'; + UPDATE DsUnits SET Cost = 60 WHERE Commander = 170 and Name = 'Scourge'; + UPDATE DsUnits SET Cost = 190 WHERE Commander = 170 and Name = 'Corruptor'; + UPDATE DsUnits SET Cost = 225 WHERE Commander = 170 and Name = 'Zagara'; + UPDATE DsUnits SET Cost = 135 WHERE Commander = 170 and Name = 'Queen'; + UPDATE DsUnits SET Cost = 17 WHERE Commander = 170 and Name = 'Swarmling'; + + -- Abathur + UPDATE DsUnits SET Cost = 110 WHERE Commander = 10 and Name = 'Swarm Queen'; + UPDATE DsUnits SET Cost = 75 WHERE Commander = 10 and Name = 'Vile Roach'; + UPDATE DsUnits SET Cost = 240 WHERE Commander = 10 and Name = 'Ravager'; + UPDATE DsUnits SET Cost = 220 WHERE Commander = 10 and Name = 'Guardian'; + UPDATE DsUnits SET Cost = 625 WHERE Commander = 10 and Name = 'Brutalisk'; + UPDATE DsUnits SET Cost = 800 WHERE Commander = 10 and Name = 'Leviathan'; + + -- Swann + UPDATE DsUnits SET Cost = 235 WHERE Commander = 140 and Name = 'Siege Tank'; + UPDATE DsUpgrades SET Cost = 150 WHERE Commander = 140 and Upgrade = 'Drakken Laser Drill'; + + -- Stukov + UPDATE DsUpgrades SET Cost = 300 WHERE Commander = 130 and Upgrade = 'Crash Landing'; + UPDATE DsUnits SET Cost = 1450 WHERE Commander = 130 and Name = 'Aleksander'; + + -- Dehaka + UPDATE DsUnits SET Cost = 430 WHERE Commander = 40 and Name = 'Impaler'; + UPDATE DsUnits SET Cost = 275 WHERE Commander = 40 and Name = 'Primal Host'; + UPDATE DsUnits SET Cost = 280 WHERE Commander = 40 and Name = 'Primal Ultralisk'; + UPDATE DsUnits SET Cost = 500 WHERE Commander = 40 and Name = 'Creeper Host'; + UPDATE DsUnits SET Cost = 90 WHERE Commander = 40 and Name = 'Primal Hydralisk'; + UPDATE DsUnits SET Cost = 85 WHERE Commander = 40 and Name = 'Ravasaur'; + UPDATE DsUnits SET Cost = 40 WHERE Commander = 40 and Name = 'Primal Zergling'; + UPDATE DsUnits SET Cost = 350 WHERE Commander = 40 and Name = 'Dehaka'; + + -- Stetmann + UPDATE DsUnits SET Cost = 700 WHERE Commander = 120 and Name = 'Mecha Battlecarrier Lord'; + UPDATE DsUnits SET Cost = 415 WHERE Commander = 120 and Name = 'Mecha Lurker'; + "; + migrationBuilder.Sql(sql2); + + var sql3 = @"UPDATE DsUpgrades SET RequiredTier = 0 WHERE Commander = 170 AND Upgrade = 'Medusa Blades'; + UPDATE DsUpgrades SET RequiredTier = 0 WHERE Commander = 170 AND Upgrade = 'Broodmother'; + UPDATE DsAbilities SET CastRange = 7 WHERE Commander = 60 AND Name = 'Precision Strike'; + UPDATE DsUnits SET Life = 110 WHERE Commander = 120 and Name = 'Mecha Roach'; + UPDATE DsUnits SET Life = 120 WHERE Commander = 120 and Name = 'Mecha Ravager'; + UPDATE DsWeapons SET DamagePerUpgrade = 1 WHERE Name = 'Erudition Missiles'; + UPDATE DsUnits SET UnitType = 9 WHERE Commander = 120 AND Name = 'Mecha Lurker'; + UPDATE DsAbilities SET Description = 'Cloaks the Centurion and lets them dash to the enemy.' WHERE Commander = 160 and Name = 'Shadow Charge'; + "; + + migrationBuilder.Sql(sql3); + } + + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} +