refactor create table and created db-config