schemaVersion property

int schemaVersion
final

The schema version used to open the Realm. If omitted, the default value is 0.

It is required to specify a schema version when initializing an existing Realm with a schema that contains objects that differ from their previous specification.

If the schema was updated and the schemaVersion was not, a RealmException will be thrown.

Implementation

final int schemaVersion;