Skip to content

Commit

Permalink
Keep schema versions as uint64_t all the way down
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Aug 11, 2015
1 parent 99f0881 commit 055e177
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Realm/RLMConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RLM_ASSUME_NONNULL_BEGIN
@property (nonatomic) BOOL readOnly;

/// The current schema version.
@property (nonatomic) NSUInteger schemaVersion;
@property (nonatomic) uint64_t schemaVersion;

/// The block which migrates the Realm to the current version.
@property (nonatomic, copy, nullable) RLMMigrationBlock migrationBlock;
Expand Down
2 changes: 1 addition & 1 deletion Realm/RLMObjectStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {
//
// NOTE: the schema passed in will be set on the Realm and may later be mutated. sharing a targetSchema accross
// even the same Realm with different column orderings will cause issues
void RLMUpdateRealmToSchemaVersion(RLMRealm *realm, NSUInteger version, RLMSchema *targetSchema, NSError *(^migrationBlock)());
void RLMUpdateRealmToSchemaVersion(RLMRealm *realm, uint64_t version, RLMSchema *targetSchema, NSError *(^migrationBlock)());

// sets a realm's schema to a copy of targetSchema
// caches table accessors on each objectSchema
Expand Down
2 changes: 1 addition & 1 deletion Realm/RLMObjectStore.mm
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static bool RLMRealmHasAllTables(RLMRealm *realm, RLMSchema *targetSchema) {
return true;
}

void RLMUpdateRealmToSchemaVersion(RLMRealm *realm, NSUInteger newVersion, RLMSchema *targetSchema, NSError *(^migrationBlock)()) {
void RLMUpdateRealmToSchemaVersion(RLMRealm *realm, uint64_t newVersion, RLMSchema *targetSchema, NSError *(^migrationBlock)()) {
ObjectStore::Schema schema;
for (RLMObjectSchema *objectSchema in targetSchema.objectSchema) {
schema.push_back(objectSchema.objectStoreCopy);
Expand Down
2 changes: 1 addition & 1 deletion RealmSwift-swift1.2/RealmConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public struct RealmConfiguration {
configuration.inMemoryIdentifier = self.inMemoryIdentifier
configuration.encryptionKey = self.encryptionKey
configuration.readOnly = self.readOnly
configuration.schemaVersion = UInt(self.schemaVersion)
configuration.schemaVersion = self.schemaVersion
configuration.migrationBlock = self.migrationBlock.map { accessorMigrationBlock($0) }
return configuration
}
Expand Down
2 changes: 1 addition & 1 deletion RealmSwift-swift2.0/RealmConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public struct RealmConfiguration {
configuration.inMemoryIdentifier = self.inMemoryIdentifier
configuration.encryptionKey = self.encryptionKey
configuration.readOnly = self.readOnly
configuration.schemaVersion = UInt(self.schemaVersion)
configuration.schemaVersion = self.schemaVersion
configuration.migrationBlock = self.migrationBlock.map { accessorMigrationBlock($0) }
return configuration
}
Expand Down

0 comments on commit 055e177

Please sign in to comment.