I can’t tell which migration caused that issue. Please be gentle with the --force option to any command.
The command only handles migrations. Not upgrading to new versions of Mautic. Since you installed Mautic with Composer, please test these steps to update to 5.0.2 and comment if they worked for you: