Laravel 创建 table 使用迁移错误
Laravel create table using migration error
我想使用迁移创建 tbl_teacher_students
table..
我的命令是php artisan make:migration create_tbl_teacher_students_table
。
我也尝试添加 --create=tbl_teacher_students
但两者都给我这个错误:
PHP Fatal error: Cannot declare class CreateFailedJobsTable, because the name is already in use
Symfony\Component\ErrorHandler\Error\FatalError
Cannot declare class CreateFailedJobsTable, because the name is already in use
我找不到任何关于 CreateFailedJobsTable
与迁移相关的错误。
另外,我还尝试将列添加到现有 table 但它给了我同样的错误。
发生这种情况,因为在您的 database/migrataions/ 目录中 create_failed_jobs_table.....
创建了两次。删除一个。然后 运行 composer dump-autoload
再试一次。这将解决问题
我想使用迁移创建 tbl_teacher_students
table..
我的命令是php artisan make:migration create_tbl_teacher_students_table
。
我也尝试添加 --create=tbl_teacher_students
但两者都给我这个错误:
PHP Fatal error: Cannot declare class CreateFailedJobsTable, because the name is already in use
Symfony\Component\ErrorHandler\Error\FatalError
Cannot declare class CreateFailedJobsTable, because the name is already in use
我找不到任何关于 CreateFailedJobsTable
与迁移相关的错误。
另外,我还尝试将列添加到现有 table 但它给了我同样的错误。
发生这种情况,因为在您的 database/migrataions/ 目录中 create_failed_jobs_table.....
创建了两次。删除一个。然后 运行 composer dump-autoload
再试一次。这将解决问题