Skip to content

First implementation of SQLAlchemy

Hugo Kerstens requested to merge Hugo/zesje:sqlalchemy into master

This MR implements SQLAlchemy as database engine instead of Pony. It also adds support for database migration using alembic.

The following things change for the app deployment:

  • Install redis
  • Install new python packages from requirements[-dev].txt
  • Optionally remove now unneeded python packages
  • Every time prior to starting the app FLASK_APP=zesje/__init__.py flask db upgrade needs to be run from the root directory in order to migrate the production database to the correct state. This can also be done using yarn migrate (and yarn migrate:dev for the development database).

This is still a WIP, these things still need to be done:

  • Implement alembic for migration
  • Optimization of queries
  • Update tests
  • Some thorough testing/benchmarking
  • Script to migrate data from current instances
  • Processing of multiple PDFs at the same time doesn't work
Edited by Anton Akhmerov

Merge request reports