Fixes to make migrate. migrate:reset and db:seed always work on boht sqlite and mysql