我有问题,让移动插件加载。
CakePlugin::load('Migrations')中的指示加载了插件app/Plugin/Migrations文件夹但是,当我尝试运行迁移时,仍然会遇到这个错误。
SPT@FI-JKL-D-18 /c/xampp/htdocs/Emailer/app (master)
$ /c/xampp/htdocs/Emailer/lib/Cake/Console/cake Migrations.migrate generate
Error: Plugin Migrate could not be found.
#0 C:\xampp\htdocs\Emailer\lib\Cake\Core\App.php(227): CakePlugin::path('Migrate')
#1 C:\xampp\htdocs\Emailer\lib\Cake\Core\App.php(549): App::path('Console/Command', 'Migrate')
#2 [internal function]: App::load('MigrateShell')
#3 [internal function]: spl_autoload_call('MigrateShell')
#4 C:\xampp\htdocs\Emailer\lib\Cake\Console\ShellDispatcher.php(257): class_exists('MigrateShell')
#5 C:\xampp\htdocs\Emailer\lib\Cake\Console\ShellDispatcher.php(203): ShellDispatcher->_getShell('Migrations.migr...')
#6 C:\xampp\htdocs\Emailer\lib\Cake\Console\ShellDispatcher.php(66): ShellDispatcher->dispatch()
#7 C:\xampp\htdocs\Emailer\lib\Cake\Console\cake.php(54): ShellDispatcher::run(Array)
#8 {main}发布于 2015-12-12 21:24:18
我相信你的语法错了。
而不是
cake Migrations.migrate generate试着跑
cake Migrations.migration generate请参阅CakeDC/迁移中的示例插件。
发布于 2020-06-06 03:10:00
我正在使用CakePHP 4,我也面临着同样的问题。我已经解决了运行命令cake migrations migrate的问题。对我来说很管用。
https://stackoverflow.com/questions/34237209
复制相似问题