I am adding a new migration but this message shows:
Unable to generate an explicit migration because the following explicit migrations are pending:
I suffered exactly the same problem just after reverting from a migration to another.
In my case I "targetedmigration" from "migration06" to "migration04".
I needed to delete the "migration0"6 and then I was able to force creating the "migration05". This basically means that you need to just keep the next migration after the targeted one.