mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:42:56 +08:00
Revert "Refactor migration precondition to read better"
Realm cannot translate `.All()` LINQ queries.
This reverts commit 0e0e8c25e8
.
This commit is contained in:
parent
ea66cd6c5e
commit
8bef50cbba
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user