简体   繁体   English

Laravel 4 PHP Artisan迁移不起作用

[英]Laravel 4 php artisan migration not working

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. 我正在尝试遵循有关数据库基础的教程,并且我正在设置Sentry2。我按要求添加了所有例外。 But on step four of the documentation page on the Sentry 2 website. 但是在Sentry 2网站上文档页面的第四步。 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}}

I tried a few things as noted in my ssh screen but nothing: 我尝试了ssh屏幕中指出的一些操作,但未进行任何操作:

    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$ 

I Google the problem and it seems like it was an issue that was suppose to be resolved in beta. 我用Google搜索了这个问题,看来这是应该在Beta版中解决的问题。 Any ideas? 有任何想法吗?

Your database config is broken. 您的数据库配置已损坏。 In app/config/database.php is a list of configured databases. 在app / config / database.php中是已配置数据库的列表。 Yours is most likely missing 'collation' in your config. 您的配置很可能会丢失“排序规则”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM