1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 19:12:57 +08:00

Revert "Refactor migration precondition to read better"

Realm cannot translate `.All()` LINQ queries.

This reverts commit 0e0e8c25e8.
This commit is contained in:
Bartłomiej Dach 2021-12-01 19:35:15 +01:00
parent ea66cd6c5e
commit 8bef50cbba
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -63,7 +63,8 @@ namespace osu.Game.Database
using (var transaction = realm.BeginWrite())
{
// only migrate data if the realm database is empty.
if (realm.All<SkinInfo>().All(s => s.Protected))
// note that this cannot be written as: `realm.All<SkinInfo>().All(s => s.Protected)`, because realm does not support `.All()`.
if (!realm.All<SkinInfo>().Any(s => !s.Protected))
{
foreach (var skin in existingSkins)
{