Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在运行 PHP 5.4.6 并安装了 FuelPHP 1.6。我正在尝试使用
oil g migration posts title:varchar[50] --soft-delete
产生的迁移看起来像这样
<?php
命名空间燃料\迁移;
class Posts { public function up() { } public function down() { } }
任何暗示是什么导致了这种奇怪的行为?
也许这是一个错误,而是生成一个迁移文件,做一个模型文件。
oil g model posts title:var[50]
石油生成器将在内部创建一个迁移文件
fuell/app/migrations/
这里的问题是缺少迁移命令,因此生成器不知道如何处理它。它应该给出一个错误,但显然它没有。
假设这是为了生成创建表的迁移,命令应该是:
oil g model create_posts title:var[50]