akeneo / pim-community-dev

[Community Development Repository] The open source Product Information Management (PIM)
http://www.akeneo.com
Other
952 stars 514 forks source link

PIM-10985: Mark skipped migrations as executed #20351

Closed pierallard closed 10 months ago

pierallard commented 10 months ago

The issue

When coding migrations, we usually used "skipIf" method in case of "the state of the PIM is already migrated". This method skips the migration, that's OK, but it did not add it as "executed". Each time we will try to re-execute migrations, we will try to re-execute theses ones. This is not a good practice ! "skipIf" means "skip and retry later".

The solution

Don't use "skipIf" ! Return is OK, it will mark migration as executed.