Database initialization code is executed on all actions and auth functions which probably leads to errors on multi-thread environments. This PR moves the initialization code to cli and is more inline with the other extensions and good conventions. Database initialization is also somewhat cleaned as raw sql lines were removed as sqlalchemy mapper already existed.
Fixes #106
Database initialization code is executed on all actions and auth functions which probably leads to errors on multi-thread environments. This PR moves the initialization code to cli and is more inline with the other extensions and good conventions. Database initialization is also somewhat cleaned as raw sql lines were removed as sqlalchemy mapper already existed.
Also flake8 violations are fixed.