简体   繁体   English

phinx“--configuration 选项不存在。”

[英]phinx "The --configuration option does not exist."

Did something happen to the phinx --configuration option? phinx --configuration选项发生了什么事情吗? A project at my work relies on it.我工作中的一个项目依赖于它。

phinx docs : If a --configuration command line option is given, Phinx will load the specified file. phinx docs : 如果给出了--configuration命令行选项,Phinx 将加载指定的文件。 Otherwise, ...除此以外, ...

however when I run:但是当我运行时:

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

  The "--configuration" option does not exist.

Also --version is not returning a version number.此外--version不返回版本号。

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

Turns out adding a migrate to the script fixed the issue and now it runs fine.结果证明向脚本添加migrate修复了这个问题,现在它运行良好。

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

I am guessing that at some point it assumed that if you ran it without the migrate that you wanted to migrate still allowed you to pass in options for it.我猜在某个时候它假设如果你在没有迁移的情况下运行它你想要迁移仍然允许你传递它的选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM