[英]Laravel migrations table not found
I'm trying to recover a project after a failed HDD.我正在尝试在硬盘故障后恢复项目。 Lost the mysql information, so just have the project code.
丢失了mysql信息,所以只有项目代码。
I hoped to be able to put my database back together by using artisan migrate
, but the error message tells me:我希望能够使用
artisan migrate
将我的数据库重新组合在一起,但错误消息告诉我:
database.migrations doesn't exist
Is there actually a way I can use my Laravel code files and the command line to rebuilt my database like this?实际上有没有一种方法可以使用我的 Laravel 代码文件和命令行来像这样重建我的数据库?
Thanks for the help.谢谢您的帮助。
The command I needed to run was:我需要运行的命令是:
php artisan migrate:install
(I actually had more problems than this because the mysql install was messed up to. I don't know if simply php artisan migrate
on its own would have implied :install but I'm adding it as an answer anyway should anyone have similar issues) (我实际上遇到了比这更多的问题,因为 mysql 安装被搞砸了。我不知道是否简单的
php artisan migrate
本身就暗示了 :install 但无论如何我都会添加它作为答案,如果有人有类似的问题)
将 .env 文件DB_HOST
更改为127.0.0.1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.