pouchdb-migrate
PouchDB plugin for running migrations.
Setup
Or to use it in Node.js, just npm install it:
npm install pouchdb-migrate
And then attach it to the PouchDB
object:
var PouchDB = ;PouchDB;
Usage
var db = 'mydb' // Migration script// * Return falsy value to skip the doc// * Make sure to prevent from loopsvar { if 'foo' in doc return docfoo = 'bar' return doc} db then //... every doc has `foo` now
Testing
Run the tests with
npm test