Delay settings initialisation until after db:migrate

Otherwise it crashes in Travis CI.