move database config to init