1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 05:27:23 +08:00

Add some more missing indices

This commit is contained in:
Dean Herbert 2017-10-17 19:59:22 +09:00
parent e4a066dc5f
commit 4e8019b313
5 changed files with 24 additions and 4 deletions

View File

@ -66,7 +66,9 @@ namespace osu.Game.Database
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<BeatmapInfo>().HasIndex(b => b.MD5Hash);
modelBuilder.Entity<BeatmapInfo>().HasIndex(b => b.Hash);
modelBuilder.Entity<BeatmapSetInfo>().HasIndex(b => b.DeletePending);
modelBuilder.Entity<BeatmapSetInfo>().HasIndex(b => b.Hash);
modelBuilder.Entity<DatabasedKeyBinding>().HasIndex(b => b.Variant);
modelBuilder.Entity<DatabasedKeyBinding>().HasIndex(b => b.IntAction);
modelBuilder.Entity<FileInfo>().HasIndex(b => b.Hash).IsUnique();

View File

@ -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");
});

View File

@ -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",

View File

@ -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");
});

View File

@ -286,9 +286,9 @@
<Compile Include="Beatmaps\Drawables\BeatmapSetCover.cs" />
<Compile Include="Beatmaps\Drawables\BeatmapSetHeader.cs" />
<Compile Include="Database\DatabaseContextFactory.cs" />
<Compile Include="Migrations\20171017092037_InitialCreate.cs" />
<Compile Include="Migrations\20171017092037_InitialCreate.designer.cs">
<DependentUpon>20171017092037_InitialCreate.cs</DependentUpon>
<Compile Include="Migrations\20171017103309_InitialCreate.cs" />
<Compile Include="Migrations\20171017103309_InitialCreate.designer.cs">
<DependentUpon>20171017103309_InitialCreate.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\OsuDbContextModelSnapshot.cs" />
<Compile Include="Online\API\Requests\GetBeatmapSetRequest.cs" />