Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration create command is not creating required folders #2105

Closed
nook24 opened this issue Sep 28, 2022 · 1 comment
Closed

migration create command is not creating required folders #2105

nook24 opened this issue Sep 28, 2022 · 1 comment

Comments

@nook24
Copy link

nook24 commented Sep 28, 2022

Howdy
Not sure if this is the right place for this issue. Anyway I noticed that the migration create command is not creating the required folders anymore:

$ bin/cake migrations create -p FooModule Initial
using migration paths
using seed paths
PHP Fatal error:  Uncaught Exception: You probably used curly braces to define migration path in your Phinx configuration file, but no directories have been matched using this pattern. You need to create a migration directory manually. in /opt/openitc/frontend/vendor/robmorgan/phinx/src/Phinx/Console/Command/Create.php:111
Stack trace:
#0 /opt/openitc/frontend/vendor/robmorgan/phinx/src/Phinx/Console/Command/Create.php(144): Phinx\Console\Command\Create->getMigrationPath()
#1 /opt/openitc/frontend/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php(37): Phinx\Console\Command\Create->execute()
#2 /opt/openitc/frontend/vendor/cakephp/migrations/src/Command/Phinx/Create.php(75): Migrations\Command\Phinx\Create->parentExecute()
#3 /opt/openitc/frontend/vendor/symfony/console/Command/Command.php(308): Migrations\Command\Phinx\Create->execute()
#4 /opt/openitc/frontend/vendor/symfony/console/Application.php(1002): Symfony\Component\Console\Command\Command->run()
#5 /opt/openitc/frontend/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#6 /opt/openitc/frontend/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#7 /opt/openitc/frontend/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(126): Symfony\Component\Console\Application->run()
#8 /opt/openitc/frontend/vendor/cakephp/cakephp/src/Console/BaseCommand.php(189): Migrations\Command\MigrationsCommand->execute()
#9 /opt/openitc/frontend/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(198): Cake\Console\BaseCommand->run()
#10 /opt/openitc/frontend/vendor/cakephp/cakephp/src/Console/CommandRunner.php(334): Migrations\Command\MigrationsCommand->run()
#11 /opt/openitc/frontend/vendor/cakephp/cakephp/src/Console/CommandRunner.php(172): Cake\Console\CommandRunner->runCommand()
#12 /opt/openitc/frontend/bin/cake.php(12): Cake\Console\CommandRunner->run()
#13 {main}
  thrown in /opt/openitc/frontend/vendor/robmorgan/phinx/src/Phinx/Console/Command/Create.php on line 111

To resolve the issue, i simply created the two folders:

mkdir -p plugins/FooModule/config/Migrations
mkdir -p plugins/FooModule/config/Seeds

I'm on CakePHP 4.4.5 using the cakephp/migrations 3.5.3
Would be good if the migration plugin would create all required folders by itself again.

@nook24
Copy link
Author

nook24 commented Sep 28, 2022

I have moved this issue to cakephp/migrations#565

@nook24 nook24 closed this as completed Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant