persistence.js is an asynchronous Javascript database mapper library. You can use it in the browser, as well on the server (and you can share data models between them).
I fixed the scope of calling the methods of migration, in previous versions you did like this:
persistence.migrate = Migrator.migrate;
The problem with this is the "migrate" function is running on context of "persistence" and not in context of "Migrator", and it causes to run migration on errors (it can't found this.version for example).
To fix this I made this function to just wrap and call functions in correct context sending same arguments, like this:
I fixed the scope of calling the methods of migration, in previous versions you did like this:
persistence.migrate = Migrator.migrate;
The problem with this is the "migrate" function is running on context of "persistence" and not in context of "Migrator", and it causes to run migration on errors (it can't found this.version for example).
To fix this I made this function to just wrap and call functions in correct context sending same arguments, like this:
persistence.migrate = function() { Migrator.migrate.apply(Migrator, Array.prototype.slice.call(arguments, 0))};