mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 16:42:57 +08:00
Refactor migration precondition to read better
This commit is contained in:
parent
370135d484
commit
0e0e8c25e8
@ -63,7 +63,7 @@ namespace osu.Game.Database
|
|||||||
using (var transaction = realm.BeginWrite())
|
using (var transaction = realm.BeginWrite())
|
||||||
{
|
{
|
||||||
// only migrate data if the realm database is empty.
|
// only migrate data if the realm database is empty.
|
||||||
if (!realm.All<SkinInfo>().Any(s => !s.Protected))
|
if (realm.All<SkinInfo>().All(s => s.Protected))
|
||||||
{
|
{
|
||||||
foreach (var skin in existingSkins)
|
foreach (var skin in existingSkins)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user