When I switched over to flask run entrypoint in b92391d177e3abb322e31646870abac46a1f6276, I forgot that the if name==__main__ code no longer triggers. So the SQLite in-memory
database wasn't getting created.
This moves the DB creation to a werkzeug/Flask hook that runs before the
first request to the app, so that the DB table is created when we query
it.
When I switched over to
flask run
entrypoint in b92391d177e3abb322e31646870abac46a1f6276, I forgot that theif name==__main__
code no longer triggers. So the SQLite in-memory database wasn't getting created.This moves the DB creation to a werkzeug/Flask hook that runs before the first request to the app, so that the DB table is created when we query it.