mirror of
https://github.com/ppy/osu.git
synced 2026-05-30 09:30:17 +08:00
Revert "Refactor migration precondition to read better"
Realm cannot translate `.All()` LINQ queries.
This reverts commit 0e0e8c25e8.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user