First implementation of SQLAlchemy
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 usingyarn migrate
(andyarn 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