diff --git a/osu.Game/Database/OsuDbContext.cs b/osu.Game/Database/OsuDbContext.cs index e360f11ba3..cfc5f056ad 100644 --- a/osu.Game/Database/OsuDbContext.cs +++ b/osu.Game/Database/OsuDbContext.cs @@ -66,7 +66,9 @@ namespace osu.Game.Database { base.OnModelCreating(modelBuilder); modelBuilder.Entity().HasIndex(b => b.MD5Hash); + modelBuilder.Entity().HasIndex(b => b.Hash); modelBuilder.Entity().HasIndex(b => b.DeletePending); + modelBuilder.Entity().HasIndex(b => b.Hash); modelBuilder.Entity().HasIndex(b => b.Variant); modelBuilder.Entity().HasIndex(b => b.IntAction); modelBuilder.Entity().HasIndex(b => b.Hash).IsUnique(); diff --git a/osu.Game/Migrations/20171017092037_InitialCreate.Designer.cs b/osu.Game/Migrations/20171017103309_InitialCreate.Designer.cs similarity index 95% rename from osu.Game/Migrations/20171017092037_InitialCreate.Designer.cs rename to osu.Game/Migrations/20171017103309_InitialCreate.Designer.cs index 422c1612d2..4d394fcd90 100644 --- a/osu.Game/Migrations/20171017092037_InitialCreate.Designer.cs +++ b/osu.Game/Migrations/20171017103309_InitialCreate.Designer.cs @@ -10,7 +10,7 @@ using System; namespace osu.Game.Migrations { [DbContext(typeof(OsuDbContext))] - [Migration("20171017092037_InitialCreate")] + [Migration("20171017103309_InitialCreate")] partial class InitialCreate { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -95,6 +95,8 @@ namespace osu.Game.Migrations b.HasIndex("BeatmapSetInfoID"); + b.HasIndex("Hash"); + b.HasIndex("MD5Hash"); b.HasIndex("RulesetID"); @@ -179,6 +181,8 @@ namespace osu.Game.Migrations b.HasIndex("DeletePending"); + b.HasIndex("Hash"); + b.ToTable("BeatmapSetInfo"); }); diff --git a/osu.Game/Migrations/20171017092037_InitialCreate.cs b/osu.Game/Migrations/20171017103309_InitialCreate.cs similarity index 95% rename from osu.Game/Migrations/20171017092037_InitialCreate.cs rename to osu.Game/Migrations/20171017103309_InitialCreate.cs index 2626e2ea74..759e8bb664 100644 --- a/osu.Game/Migrations/20171017092037_InitialCreate.cs +++ b/osu.Game/Migrations/20171017103309_InitialCreate.cs @@ -211,6 +211,11 @@ namespace osu.Game.Migrations table: "BeatmapInfo", column: "BeatmapSetInfoID"); + migrationBuilder.CreateIndex( + name: "IX_BeatmapInfo_Hash", + table: "BeatmapInfo", + column: "Hash"); + migrationBuilder.CreateIndex( name: "IX_BeatmapInfo_MD5Hash", table: "BeatmapInfo", @@ -248,6 +253,11 @@ namespace osu.Game.Migrations table: "BeatmapSetInfo", column: "DeletePending"); + migrationBuilder.CreateIndex( + name: "IX_BeatmapSetInfo_Hash", + table: "BeatmapSetInfo", + column: "Hash"); + migrationBuilder.CreateIndex( name: "IX_FileInfo_Hash", table: "FileInfo", diff --git a/osu.Game/Migrations/OsuDbContextModelSnapshot.cs b/osu.Game/Migrations/OsuDbContextModelSnapshot.cs index 69cc206b7e..ef2c801a6c 100644 --- a/osu.Game/Migrations/OsuDbContextModelSnapshot.cs +++ b/osu.Game/Migrations/OsuDbContextModelSnapshot.cs @@ -94,6 +94,8 @@ namespace osu.Game.Migrations b.HasIndex("BeatmapSetInfoID"); + b.HasIndex("Hash"); + b.HasIndex("MD5Hash"); b.HasIndex("RulesetID"); @@ -178,6 +180,8 @@ namespace osu.Game.Migrations b.HasIndex("DeletePending"); + b.HasIndex("Hash"); + b.ToTable("BeatmapSetInfo"); }); diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 9c6e03249e..9941792ec5 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -286,9 +286,9 @@ - - - 20171017092037_InitialCreate.cs + + + 20171017103309_InitialCreate.cs