Merge branch '0.13.x'
* 0.13.x: [0.13.2] Bump version fix for upgrading optional date properties
This commit is contained in:
commit
78a8311ba6
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -9,6 +9,17 @@ x.x.x Release notes (yyyy-MM-dd)
|
|||
### Bugfixes
|
||||
* None
|
||||
|
||||
0.13.2 Release notes (2016-5-26)
|
||||
=============================================================
|
||||
### Breaking changes
|
||||
* None
|
||||
|
||||
### Enhancements
|
||||
* None
|
||||
|
||||
### Bugfixes
|
||||
* Fix for crash when updating Realms with optional date properties to the new file format
|
||||
|
||||
0.13.1 Release notes (2016-5-24)
|
||||
=============================================================
|
||||
### Breaking changes
|
||||
|
|
|
@ -13,7 +13,4 @@
|
|||
<FileRef
|
||||
location = "group:examples/ReactExample/ios/ReactExample.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:src/node/RealmNode.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "realm",
|
||||
"description": "Realm is a mobile database: an alternative to SQLite and key-value stores",
|
||||
"version": "0.13.1",
|
||||
"version": "0.13.2",
|
||||
"license": "Apache-2.0",
|
||||
"homepage": "https://realm.io",
|
||||
"keywords": [
|
||||
|
|
|
@ -82,7 +82,7 @@ rm -rf react-native/android/build
|
|||
|
||||
# Publish to npm, informing the prepublish script to build Android modules.
|
||||
echo "Publishing $VERSION to npm..."
|
||||
PRERELEASE=$(grep -Eio '[a-z]+' <<< "$VERSION")
|
||||
PRERELEASE=$(grep -Eio '[a-z]+' <<< "$VERSION" || true)
|
||||
REALM_BUILD_ANDROID=1 npm publish ${PRERELEASE:+--tag $PRERELEASE}
|
||||
|
||||
# Only push the tag to GitHub if the publish was successful.
|
||||
|
|
|
@ -801,7 +801,7 @@
|
|||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 0.13.1;
|
||||
CURRENT_PROJECT_VERSION = 0.13.2;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
|
@ -862,7 +862,7 @@
|
|||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 0.13.1;
|
||||
CURRENT_PROJECT_VERSION = 0.13.2;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
|
@ -956,7 +956,7 @@
|
|||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 0.13.1;
|
||||
CURRENT_PROJECT_VERSION = 0.13.2;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
|
@ -1023,7 +1023,7 @@
|
|||
buildSettings = {
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 0.13.1;
|
||||
DYLIB_CURRENT_VERSION = 0.13.2;
|
||||
EXECUTABLE_PREFIX = lib;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
|
@ -1053,7 +1053,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 0.13.1;
|
||||
DYLIB_CURRENT_VERSION = 0.13.2;
|
||||
EXECUTABLE_PREFIX = lib;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"REALM_PLATFORM_NODE=1",
|
||||
|
@ -1082,7 +1082,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 0.13.1;
|
||||
DYLIB_CURRENT_VERSION = 0.13.2;
|
||||
EXECUTABLE_PREFIX = lib;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"REALM_PLATFORM_NODE=1",
|
||||
|
|
|
@ -260,6 +260,9 @@ static inline void convert_outdated_datetime_columns(const SharedRealm &realm) {
|
|||
}
|
||||
|
||||
for (size_t row_index = 0; row_index < table->size(); row_index++) {
|
||||
if (table->is_null(property.table_column, row_index)) {
|
||||
continue;
|
||||
}
|
||||
auto milliseconds = table->get_timestamp(property.table_column, row_index).get_seconds();
|
||||
table->set_timestamp(property.table_column, row_index, Timestamp(milliseconds / 1000, (milliseconds % 1000) * 1000000));
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -479,13 +479,19 @@ module.exports = BaseTest.extend({
|
|||
|
||||
// test file format upgrade
|
||||
var realm_v3 = new Realm({path: 'dates-v3.realm', schema: [schemas.DateObject]});
|
||||
TestCase.assertEqual(realm_v3.objects('Date').length, 1);
|
||||
TestCase.assertEqual(realm_v3.objects('Date').length, 2);
|
||||
TestCase.assertEqual(realm_v3.objects('Date')[0].currentDate.getTime(), 1462500087955);
|
||||
TestCase.assertEqual(realm_v3.objects('Date')[0].nullDate.getTime(), 1462500087955);
|
||||
TestCase.assertEqual(realm_v3.objects('Date')[1].currentDate.getTime(), -10000);
|
||||
TestCase.assertEqual(realm_v3.objects('Date')[1].nullDate, null);
|
||||
|
||||
// get new file format is not upgraded
|
||||
var realm_v5 = new Realm({path: 'dates-v5.realm', schema: [schemas.DateObject]});
|
||||
TestCase.assertEqual(realm_v5.objects('Date').length, 1);
|
||||
TestCase.assertEqual(realm_v5.objects('Date')[0].currentDate.getTime(), 1462500087955);
|
||||
TestCase.assertEqual(realm_v5.objects('Date').length, 2);
|
||||
TestCase.assertEqual(realm_v3.objects('Date')[0].currentDate.getTime(), 1462500087955);
|
||||
TestCase.assertEqual(realm_v3.objects('Date')[0].nullDate.getTime(), 1462500087955);
|
||||
TestCase.assertEqual(realm_v3.objects('Date')[1].currentDate.getTime(), -10000);
|
||||
TestCase.assertEqual(realm_v3.objects('Date')[1].nullDate, null);
|
||||
|
||||
// test different dates
|
||||
var realm = new Realm({schema: [schemas.DateObject]});
|
||||
|
|
|
@ -739,7 +739,7 @@ module.exports = BaseTest.extend({
|
|||
Realm.copyBundledRealmFiles();
|
||||
|
||||
var realm = new Realm({path: 'dates-v5.realm', schema: [schemas.DateObject]});
|
||||
TestCase.assertEqual(realm.objects('Date').length, 1);
|
||||
TestCase.assertEqual(realm.objects('Date').length, 2);
|
||||
TestCase.assertEqual(realm.objects('Date')[0].currentDate.getTime(), 1462500087955);
|
||||
|
||||
var newDate = new Date(1);
|
||||
|
|
|
@ -174,6 +174,7 @@ exports.NullQueryObject = {
|
|||
exports.DateObject = {
|
||||
name: 'Date',
|
||||
properties: {
|
||||
currentDate: 'date'
|
||||
currentDate: 'date',
|
||||
nullDate: { type: 'date', optional: true }
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue