reorganize db config