lib/Ext/device/sqlite/Sencha.js
function(config) {
            if (config.oldVersion == null) {
                Ext.Logger.error('Ext.device.SQLite#changeVersion: You must specify an `oldVersion` of the database.');
                return null;
            }

            if (config.newVersion == null) {
                Ext.Logger.error('Ext.device.SQLite#changeVersion: You must specify a `newVersion` of the database.');
                return null;
            }

            this.transaction(Ext.apply(config, {
                preflight: function() {
                    return config.oldVersion == this.getVersion() ? null : 'Unable to change version: version mismatch';
                },
                postflight: function() {
                    var result = Ext.device.Communicator.send({
                        command: 'SQLite#setVersion',
                        sync: true,
                        databaseId: this.id,
                        version: config.newVersion
                    });

                    if (result) {
                        this.version = config.newVersion;
                    }
                }
            }));
        }
function(config) {
            if (config.oldVersion == null) {
                Ext.Logger.error('Ext.device.SQLite#changeVersion: You must specify an `oldVersion` of the database.');
                return null;
            }

            if (config.newVersion == null) {
                Ext.Logger.error('Ext.device.SQLite#changeVersion: You must specify a `newVersion` of the database.');
                return null;
            }

            this.transaction(Ext.apply(config, {
                preflight: function() {
                    return config.oldVersion == this.getVersion() ? null : 'Unable to change version: version mismatch';
                },
                postflight: function() {
                    var result = Ext.device.Communicator.send({
                        command: 'SQLite#setVersion',
                        sync: true,
                        databaseId: this.id,
                        version: config.newVersion
                    });

                    if (result) {
                        this.version = config.newVersion;
                    }
                }
            }));
        }
Verifies and changes the version of the database at the same time
as doing a schema update with a {@link Ext.device.sqlite.SQLTransaction} instance.

@param {Object} config
The object which contains the following config options:

@param {String} config.oldVersion This is required.
The current version of the database.

@param {String} config.newVersion This is required.
The new version of the database.

@param {Function} config.callback This is optional.
The callback to be called when the transaction has been created.

@param {Ext.device.sqlite.SQLTransaction} config.callback.transaction
The created transaction.

@param {Function} config.success This is optional.
The callback to be called when the transaction has been successfully commited.

@param {Function} config.failure This is optional.
The callback to be called when an error occurred and the transaction has been rolled back.

@param {Object} config.failure.error
The occurred error.

@param {Object} config.scope
The scope object