php artisan不会迁移此类文件或目录 [英] Php artisan migrate no such file or directory

查看:77
本文介绍了php artisan不会迁移此类文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试运行迁移时创建了make:migration,但出现以下错误

I created a make:migration when I try to run the migration I get the following error

没有这样的文件或目录(SQL:从*中选择* information_schema.tables其中table_schema =宅基地和 table_name =迁移).

No such file or directory (SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations).

在我的环境文件中,我的数据库名称是宅基地,在我的数据库中,我有一个名为migrations的表.不太确定为什么会收到此错误.

In my env file my db name is homestead and in my db I have a table named migrations. Not really sure why I am getting this error.

推荐答案

1)运行命令:

1) Run command:

composer dump-autoload

composer dump-autoload

2)回滚命令:

2) rollback command:

php artisan migration:rollback

php artisan migrate:rollback

然后创建您的迁移:

Then create your migration:

php artisan make:migration create_users_table

php artisan make:migration create_users_table

这篇关于php artisan不会迁移此类文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆