step 3, the database

http://flask.pocoo.org/docs/0.10/tutorial/dbinit/#tutorial-dbinit

I actually had to revert one of the improvements to make this work, but
we’ll put the envvar things back in place when they’re needed later.