lib/schemaMigration.js
function confChanged(current, proposed) {
    if (stringify(current.conf) !== stringify(proposed.conf)) {
        if (current.version >= proposed.version) {
            const e = new Error('Schema change, but no version increment.');
            e.current = current;
            e.proposed = proposed;
            throw e;
        }
        return true;
    } else {
        return false;
    }
}
function confChanged(current, proposed) {
    if (stringify(current.conf) !== stringify(proposed.conf)) {
        if (current.version >= proposed.version) {
            const e = new Error('Schema change, but no version increment.');
            e.current = current;
            e.proposed = proposed;
            throw e;
        }
        return true;
    } else {
        return false;
    }
}
function confChanged ( current , proposed ) { if ( stringify ( current . conf ) !== stringify ( proposed . conf ) ) { if ( current . version >= proposed . version ) { const e = new Error ( 'Schema change, but no version increment.' ) ; e . current = current ; e . proposed = proposed ; throw e ; } return true ; } else { return false ; } }
Check if a schema part differs, and if it does, if the version was
incremented.
@param {Object} current { conf: {object}, version: {number} }
@param {Object} proposed { conf: {object}, version: {number} }
@return {boolean} Whether the attribute has changed.
@throws {Error} If the schema fragment changed, but the version was not
incremented.
Check if a schema part differs and if it does if the version was incremented .