Build the db for functional tests.