PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, January 11, 2022

[FIXED] Migrations in CakePHP 4 not working correctly?

 January 11, 2022     cakephp, cakephp-4.x     No comments   

Issue

I'm running a fresh install of CakePHP 4 and I'm trying to create an initial migration for the database. The migration itself is build correctly but the command fails to mark the migrations as done:

~/code$ bin/cake bake migration_snapshot Initial

Creating file /home/vagrant/code/config/Migrations/20200125204245_Initial.php
Wrote `/home/vagrant/code/config/Migrations/20200125204245_Initial.php`
Marking the migration 20200125204245_Initial as migrated...
Exception: Shell class for "Migrations" could not be found. If you are trying to use a plugin shell, that was loaded via $this->addPlugin(), you may need to update bin/cake.php to match https://github.com/cakephp/app/tree/master/bin/cake.php
In [/home/vagrant/code/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php, line 332]

Since the migration is created successfully I'm pretty sure the plugin is installed correctly but somehow Bake can't access it?

The installed versions are:

  • CakePHP 4.0.2
  • CakePHP/Bake 2.0.4
  • CakePHP/Migrations 3.0.0-beta2

Solution

Apparently it's a bug and an issue has been created:

https://github.com/cakephp/bake/issues/638



Answered By - wouter
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing