1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 07:23:14 +08:00

FIx missing columns yet again

This commit is contained in:
Dean Herbert 2017-10-18 21:57:54 +09:00
parent 00be98dba7
commit 71d614b813
6 changed files with 10 additions and 6 deletions

View File

@ -115,7 +115,7 @@ namespace osu.Game.Tests.Beatmaps.IO
//ensure we were stored to beatmap database backing...
Assert.IsTrue(resultSets.Count() == 1, $@"Incorrect result count found ({resultSets.Count()} but should be 1).");
Func<IEnumerable<BeatmapInfo>> queryBeatmaps = () => store.QueryBeatmaps(s => s.OnlineBeatmapSetID == 241526 && s.BaseDifficultyID > 0);
Func<IEnumerable<BeatmapInfo>> queryBeatmaps = () => store.QueryBeatmaps(s => s.BeatmapSet.OnlineBeatmapSetID == 241526 && s.BaseDifficultyID > 0);
Func<IEnumerable<BeatmapSetInfo>> queryBeatmapSets = () => store.QueryBeatmapSets(s => s.OnlineBeatmapSetID == 241526);
//if we don't re-check here, the set will be inserted but the beatmaps won't be present yet.

View File

@ -12,7 +12,6 @@ namespace osu.Game.Beatmaps
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ID { get; set; }
[NotMapped]
public int? OnlineBeatmapSetID { get; set; }
public BeatmapMetadata Metadata { get; set; }

View File

@ -10,7 +10,7 @@ using System;
namespace osu.Game.Migrations
{
[DbContext(typeof(OsuDbContext))]
[Migration("20171017103309_InitialCreate")]
[Migration("20171018125509_InitialCreate")]
partial class InitialCreate
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -175,6 +175,8 @@ namespace osu.Game.Migrations
b.Property<string>("Hash");
b.Property<int?>("OnlineBeatmapSetID");
b.Property<bool>("Protected");
b.HasKey("ID");

View File

@ -16,6 +16,7 @@ namespace osu.Game.Migrations
.Annotation("Sqlite:Autoincrement", true),
DeletePending = table.Column<bool>(type: "INTEGER", nullable: false),
Hash = table.Column<string>(type: "TEXT", nullable: true),
OnlineBeatmapSetID = table.Column<int>(type: "INTEGER", nullable: true),
Protected = table.Column<bool>(type: "INTEGER", nullable: false)
},
constraints: table =>

View File

@ -174,6 +174,8 @@ namespace osu.Game.Migrations
b.Property<string>("Hash");
b.Property<int?>("OnlineBeatmapSetID");
b.Property<bool>("Protected");
b.HasKey("ID");

View File

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