Modify database_connection to prefer databaseurl