首页 > 解决方案 > phinx "--configuration 选项不存在。"

问题描述

菲尼克斯--configuration选项发生了什么?我工作中的一个项目依赖于它。

phinx docs:如果--configuration给出命令行选项,Phinx 将加载指定的文件。否则, ...

但是当我运行时:

$ ./vendor/bin/phinx --configuration=my_config.php

  The "--configuration" option does not exist.

也不--version返回版本号。

Phinx by CakePHP - https://phinx.org.

标签: phpconfigurationmigrationphinx

解决方案


原来migrate在脚本中添加一个解决了这个问题,现在它运行良好。

../vendor/bin/phinx migrate --configuration=my_config.php

我猜在某些时候它假设如果您在没有要迁移的迁移的情况下运行它仍然允许您为它传递选项。


推荐阅读