migrate db and set root path