create and migrate db