Generating database config