Skip to content

WIP: switch from PouchDB to SQLite/MySQL via Bookshelf + Knex

Alf Eaton requested to merge bookshelf into master

This is still far from fully working, but creating this MR to show progress.

  • Configure Knex connections in knexfile.js and src/models/knex.js
  • Configure Bookshelf + plugins in src/models/bookshelf.js
  • Extend bookshelf.Model for each model
  • Initialise the database tables using a migration
  • Use an in-memory SQLite database for testing; rebuild it from scratch before each test that uses the db

TODO:

  • Finish rebuilding the database for each test
  • Update all the places that call methods on a model

Merge request reports