Move database setup to before asset precompilation