Fix tests command
Improve migrate command