add database config and simple migration