Add optional skin foreign key to databased settings

This commit is contained in:
Dean Herbert
2019-05-25 15:09:31 +09:00
parent 05c0df53dc
commit 31e6a4fa59
6 changed files with 565 additions and 0 deletions

View File

@ -1,6 +1,8 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using Microsoft.EntityFrameworkCore;
using osu.Framework.Platform;
using osu.Game.Database;
@ -12,5 +14,9 @@ namespace osu.Game.Skinning
: base(contextFactory, storage)
{
}
protected override IQueryable<SkinInfo> AddIncludesForDeletion(IQueryable<SkinInfo> query) =>
base.AddIncludesForDeletion(query)
.Include(s => s.Settings); // don't include FileInfo. these are handled by the FileStore itself.
}
}