How do I mark an Evolve migration complete?

Viewed 37

I am using Evolve to manage database migrations. I made a schema update directly to the database without using Evolve, then created a migration script, and now I need Evolve to recognize that it's already been done. How can I do that?

The Evolve site says this:

Can I mark a migration as already executed?

Yes! Sometimes a hotfix is quickly applied in production without a proper Evolve migration. To ensure consistency across all environments, a migration matching those changes must be added to version control but skip in production. Use the option SkipNextMigrations to fix this issue.

I followed the syntax example given in GitHub but it tells me that it's an unrecognized option (I tried --skip-next-migrations true as well as --SkipNextMigrations).

For example:

./evolve migrate mysql -c "$CONNECTION_STRING" -l ../migrations --command-timeout 36000 --skip-next-migrations true
1 Answers

The ability to skip migrations was introduced with version 3.0.0.

Evolve releases

The syntax is:

./evolve migrate mysql -c "$CONNECTION_STRING" -l <path-to-migration-files> --command-timeout 36000 --skip-next-migrations true
Related