Skip to content

Fix upgrade command not matching plugins with slashes#1039

Merged
dereuromark merged 2 commits into5.xfrom
fix-upgrade-slash-plugins
Mar 7, 2026
Merged

Fix upgrade command not matching plugins with slashes#1039
dereuromark merged 2 commits into5.xfrom
fix-upgrade-slash-plugins

Conversation

@dereuromark
Copy link
Member

Summary

  • Fix plugin name extraction in UpgradeCommand::findLegacyTables() for plugins with slashes (like CakeDC/Users)
  • Build a map of loaded plugins to their expected table prefixes, allowing proper matching
  • Add test coverage for plugins with slashes in the name

Fixes #1038

When upgrading from legacy phinxlog tables, the plugin name was being
derived by camelizing the table prefix (e.g. cake_d_c_users -> CakeDCUsers).
This didn't work for plugins with slashes in their names like CakeDC/Users
since the slash was replaced with underscore during table name generation.

This fix builds a map of loaded plugin names to their expected table
prefixes, allowing proper matching of plugins like CakeDC/Users.

Fixes #1038
@LordSimal
Copy link
Contributor

Can confirm this fixes my problem 👍🏻

@dereuromark dereuromark merged commit 8d27e00 into 5.x Mar 7, 2026
14 checks passed
@dereuromark dereuromark deleted the fix-upgrade-slash-plugins branch March 7, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bin/cake migrations status -p CakeDC/Users does not work anymore after migrating to new unified table

2 participants