organize database building before migration