default the schema version to 0 when a schema is provided
This commit is contained in:
parent
18c419fb96
commit
5e1ecdf19e
|
@ -351,6 +351,9 @@ void RealmClass<T>::constructor(ContextType ctx, ObjectType this_object, size_t
|
|||
if (!Value::is_undefined(ctx, version_value)) {
|
||||
config.schema_version = Value::validated_to_number(ctx, version_value, "schemaVersion");
|
||||
}
|
||||
else if (schema_updated) {
|
||||
config.schema_version = 0;
|
||||
}
|
||||
|
||||
static const String migration_string = "migration";
|
||||
ValueType migration_value = Object::get_property(ctx, object, migration_string);
|
||||
|
|
Loading…
Reference in New Issue