How can I force a 3 month old migration to re-run when I've got 60 or 70 migrations in between and I don't want to/can't do a full rollback?
Apparently supplying the --version parameter of the value that I want it to re-run doesn't work, and neither does just deleting the value from the VersionInfo table (both having been done together also doesn't seem to have any benefit).
Is there a way to have FluentMigrator re-run a single migration from a few months ago? Am I pebkacking the problem?
For future readers,
FluentMigrator will look at the latest migration AppliedOn date and then continue from there, so if your migration is a few months old it won't re-run the migration even if you remove that entry from the versioninfo table.
What you can do to cheat is to add the migration again, but this time add with defensive coding. i.e, if the changes that you wanted to apply are already applied then don't try to do that again. I don't know how your migration look like but here's an example of what i mean by defensive coding:
this will not alter table and try to add the column if ProductType is already there.
Disclaimer: this is a hack, test your migrations on dev/test before running them on uat/production, in the perfect world we shouldn't have to do these things, but we're not living in the perfect world.