From e65ad57e00ab2e14a09c72fbdf5e7eb631682231 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 2 Sep 2015 09:31:06 -0700 Subject: [PATCH] Skip PK uniqueness checking when first creating a Realm file --- src/object-store/object_store.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/object-store/object_store.cpp b/src/object-store/object_store.cpp index 1f99c400..bb713e4c 100644 --- a/src/object-store/object_store.cpp +++ b/src/object-store/object_store.cpp @@ -387,9 +387,9 @@ bool ObjectStore::update_realm_with_schema(Group *group, // apply the migration block if provided and there's any old data if (get_schema_version(group) != ObjectStore::NotVersioned) { migration(group, schema); - } - validate_primary_column_uniqueness(group, schema); + validate_primary_column_uniqueness(group, schema); + } set_schema_version(group, version); return true;