如何解决使用make migration命令添加列错误
我正在尝试将icon_path
列添加到名为tbl_device
的现有表中
通过使用php artisan make:migration add_icon_path_to_tbl_device_table --table=tbl_device
运行php artisan migrate
之后,它给了我这个错误。
PHP Fatal error: Cannot declare class CreateFailedJobsTable,because the name is already in use in ...path\database\migrations\<date>_create_failed_jobs_table.php
Cannot declare class CreateFailedJobsTable,because the name is already in use
我还尝试了将icon_path
列手动添加到create_tbl_device_table.php
迁移中,并在运行php artisan migrate
后说Nothing to migrate
。
我想我遵循了所有说明。.知道我哪里出错了吗?
解决方法
仅使用以下方式针对特定的迁移调用artisan migration命令:
php artisan migrate --path=/database/migrations/my_migrations
看看是否可行。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。