PHP Artisan Migration始终以代码255退出 [英] Php artisan migrate always exit with code 255

查看:49
本文介绍了PHP Artisan Migration始终以代码255退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行php artisan migration命令(及其所有变体)时遇到问题

I have problems running the command php artisan migrate ( and all his variants)

当我键入:

 migrate:install      
 migrate:refresh      
 migrate:reset        
 migrate:rollback

我知道

 Process finished with exit code 255 at 16:25:30.
 Execution time: 969 ms.

唯一可行的是:

php artisan migrate:status

+------+------------------------------------------------+
| Ran? | Migration                                      |
+------+------------------------------------------------+
| N    | 2014_10_12_000000_create_users_table           |
| N    | 2014_10_12_100000_create_password_resets_table |
| Y    | 2015_11_01_171759_create_Association_table     |
| Y    | 2015_11_01_171759_create_Club_table            |
| Y    | 2015_11_01_171759_create_Competitor_table      |
| N    | 2015_11_01_171759_create_Fight_table           |
| N    | 2015_11_01_171759_create_Grade_table           |
| N    | 2015_11_01_171759_create_Place_table           |
| N    | 2015_11_01_171759_create_ShiaiCategory_table   |
| N    | 2015_11_01_171759_create_Shinpan_table         |
| N    | 2015_11_01_171759_create_Team_table            |
| N    | 2015_11_01_171759_create_Tournament_table      |
| N    | 2015_11_01_171809_create_foreign_keys          |
| N    | 2015_11_02_182709_setup_countries_table        |
| N    | 2015_11_02_182710_charify_countries_table      |
+------+------------------------------------------------+

Process finished with exit code 0 at 16:27:00.
Execution time: 1,026 ms.

我该怎么做才能运行查询?

What can I do to run my queries???

一个重要的事实,也许是php artisan ...在我的Windows计算机上运行良好.

One important fact, maybe, php artisan ... was working well in my Windows Computer.

现在,我已经在Mac中导入了git项目,并且不再工作了.

Now, I have imported my git project in my mac, and doesn't work anymore.

任何想法?

推荐答案

您的 php artisan migration:status 显示您的某些迁移实际上已经在运行.这使我相信您并没有真正的错误,而只是在转移内容时途中有些东西弄乱了.由于Laravel试图跟踪您的迁移,因此如果事情不同步,可能会导致问题.

Your php artisan migrate:status shows that some of your migrations did in fact run. This leads me to believe that you don't really have an error, but just that something got messed up along the way when you were transferring things. Since Laravel is trying to keep track of your migrations, if things get out of sync it can cause problems.

因此,有时是简单的重置才能达到目的.但是,运行 php artisan migrate:rollback 不会完全重置数据库,它会留下 migrations 表.

Thus it is sometimes the simple reset that does the trick. However, running php artisan migrate:rollback doesn't fully reset your database, it leaves a migrations table.

要完全重新开始,只需手动删除数据库中的所有表,然后再次尝试运行 php artisan migration ,它应该可以工作!

To fully start over, just manually delete all the tables in your database, and then try running php artisan migrate over again, and it should work!

这篇关于PHP Artisan Migration始终以代码255退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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