Laravel 4 PHP Artisan迁移不起作用 [英] Laravel 4 php artisan migration not working

查看:84
本文介绍了Laravel 4 PHP Artisan迁移不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试遵循有关数据库基础的教程,并且我正在设置Sentry2.我已按要求添加了所有例外.但是在Sentry 2网站上文档页面的第四步.我收到以下错误

I am trying to follow a tutorial about the basics of Databases and i am at the part of setting up Sentry 2. I added all the exceptions as requested. But on step four of the documentation page on the Sentry 2 website. I am getting the following error

{"error":{"type":"ErrorException","message":"Undefined index: collation","file":"\/var\/www\/db_test\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/MySqlConnector.php","line":22}}

我尝试了ssh屏幕中指出的一些操作,但没有进行任何操作:

I tried a few things as noted in my ssh screen but nothing:

    robert@Devlopement:/var/www/db_test$ php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing cartalyst/sentry (dev-master 9a8221d)
    Downloading: 100%

Writing lock file
Generating autoload files
Generating optimized class loader
Compiling common classes
robert@Devlopement:/var/www/db_test$ php artisan key:generate
Application key [Dabb88Fw5080yq53cYgyprredmPbVBpK] set successfully.
robert@Devlopement:/var/www/db_test$ php artisan migrate --package=cartalyst/sentry
{"error":{"type":"ErrorException","message":"Undefined index: collation","file":"\/var\/www\/db_test\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/MySqlConnector.php","line":22}}robert@Devlopement:/var/www/db_test$ phptrytisan migrate --package=cartalyst/sen
{"error":{"type":"ErrorException","message":"Undefined index: collation","file":"\/var\/www\/db_test\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/MySqlConnector.php","line":22}}robert@Devlopement:/var/www/db_test$ ^C
robert@Devlopement:/var/www/db_test$ 

我用Google搜索了这个问题,看来这是应该在Beta版中解决的问题.有什么想法吗?

I Google the problem and it seems like it was an issue that was suppose to be resolved in beta. Any ideas?

推荐答案

您的数据库配置已损坏.在app/config/database.php中是已配置数据库的列表.您的配置很可能会丢失排序规则".

Your database config is broken. In app/config/database.php is a list of configured databases. Yours is most likely missing 'collation' in your config.

这篇关于Laravel 4 PHP Artisan迁移不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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