You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running doctrine:migration:status previously reported migrations as executed.
Current behavior
Running doctrine:migration:status now, shows that all my migrations are not executed.
How to reproduce
Install migration v2.3.4, execute some migrations then upgrade to v3.5.5.
Upon digging, it seems the problem is upon using ReflectionClass, getName returns the FQDN of the class instead of the short class name (maybe it used to do this before?):
Because afterwards it is comparing executed version name vs available version, but they dont match, one has FQDN while in the DB it says Version2023... only without namespace.
When upgrading to a new major version, you need to run doctrine:migrations:sync-metadata-storage command to migrate the metadata storage to the new format.
doctrine:migrations:status does not automatically migrate the stored metadata (note that any command that modify metadata due to executing some migrations will trigger a storage sync first to ensure they don't corrupt the storage by having a mix of versions).
Apologies, I forgot to mention that I had already run that sync command, yet the problem remains. Is the sync command supposed to update the version column in the database with the namespace ?
BC Break Report
I upgraded from doctrine/migrations 2.3.4 to 3.5.5 breaks migrations detections
Summary
Introduction of
migration_paths
breaks detection of executed migrations.Before upgrade, I had this configuration (yaml):
After upgrade:
Previous behavior
Running doctrine:migration:status previously reported migrations as executed.
Current behavior
Running doctrine:migration:status now, shows that all my migrations are not executed.
How to reproduce
Install migration v2.3.4, execute some migrations then upgrade to v3.5.5.
Upon digging, it seems the problem is upon using ReflectionClass, getName returns the FQDN of the class instead of the short class name (maybe it used to do this before?):
migrations/lib/Doctrine/Migrations/Finder/Finder.php
Line 63 in 832ef28
Added screenshot of migration_versions table:
Because afterwards it is comparing executed version name vs available version, but they dont match, one has FQDN while in the DB it says Version2023... only without namespace.
Edit: Found the commit that changed the behavior (3.0 release commit):
d74785f#diff-3ba1cb4b1d3fc85dc36972850335e25c1e714e8dad9f794a0ff79ec7b2a2ec94L67
The text was updated successfully, but these errors were encountered: