Get a database handle earlier so that we can init the tables if we need to.