您当前的位置: 首页 >  ar
  • 3浏览

    0关注

    482博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Laravel5.5问题:SQLSTATE[42000] Syntax error or access violation 1071 Specified key was too long; max k

高精度计算机视觉 发布时间:2017-11-24 15:48:43 ,浏览量:3

Laravel5.5 配置后台管理包Voyager问题:SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes

听说voyager不错,新建立一个文件尝试了一下,

D:\wamp64\www\laravel\myproject λ> php artisan voyager:install –with-dummy

Setting up the hooks

Hooks are now ready to use! Go ahead and try to "php artisan hook:install test-hook"
Publishing the Voyager assets, database, language, and config files
Copied Directory [\vendor\tcg\voyager\publishable\assets] To [\public\vendor\tcg\voyager\assets]
Copied Directory [\vendor\tcg\voyager\publishable\database\migrations] To [\database\migrations]
Copied Directory [\vendor\tcg\voyager\publishable\database\seeds] To [\database\seeds]
Copied Directory [\vendor\tcg\voyager\publishable\demo_content] To [\storage\app\public]
Copied Directory [\vendor\tcg\voyager\publishable\lang] To [\resources\lang]
Publishing complete.
Publishing complete.
Migrating the database tables into your application
Migration table created successfully.

 [Illuminate\Database\QueryException]
  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table users add unique users_email_unique(email))

  [Doctrine\DBAL\Driver\PDOException]
  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes

  [PDOException]
  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes

问题让人头大,根据laravel官方的文档,更改laravel5.5的文件( ../app/providers/appServiceProvider.php)内容 , 如下

            
关注
打赏
1659873853
查看更多评论
0.2406s