laravel Specified key was too long 解决方案
来源:互联网 发布:有趣的工作 知乎 编辑:程序博客网 时间:2024/05/29 13:25
参考地址 https://laravel.com/docs/master/migrations#creating-indexes
http://www.cnblogs.com/betx/p/6544090.html
解决办法:
Index Lengths & MySQL / MariaDB
Laravel uses the utf8mb4
character set by default, which includes support for storing "emojis" in the database. If you are running a version of MySQL older than the 5.7.7 release or MariaDB older than the 10.2.2 release, you may need to manually configure the default string length generated by migrations in order for MySQL to create indexes for them. You may configure this by calling theSchema::defaultStringLength
method within your AppServiceProvider
:
use Illuminate\Support\Facades\Schema;/** * Bootstrap any application services. * * @return void */public function boot(){ Schema::defaultStringLength(191);}
1 0
- laravel Specified key was too long 解决方案
- Specified key was too long
- laravel错误1071 Specified key was too long; max key length is 1000 bytes
- laravel错误1071 Specified key was too long; max key length is 1000 bytes
- Laravel 5.4 migrate时报错: Specified key was too long error
- Laravel 5.4 migrate时报错: Specified key was too long error
- Laravel 5.4 migrate时报错: Specified key was too long error
- Laravel migrate时报错: Syntax error or access violation: 1071 Specified key was too long
- Laravel 5.4 migrate时报错: Specified key was too long error
- hive create table: Specified key was too long; max
- hive创建表错误[ Specified key was too long]
- Specified key was too long; max key length is 767 bytes
- MySQL: ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
- MySQL错误“Specified key was too long; max key length is 1000 bytes”
- hive的Specified key was too long; max key length is 767 bytes问题解决
- MySQL: ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
- MySQL错误“Specified key was too long; max key length is 1000 bytes”的解决办
- 错误代码: 1071 Specified key was too long; max key length is 1000 bytes
- Service层在J2EE分层结构中的作用
- 聚类分析
- javaSE_8系列博客——Java语言的特性(三)--类和对象(2)--类(宏观概述)
- 服务器遇到大流量攻击的处理过程
- HDU 2036 改革春风吹满地 (叉积求多边形面积)
- laravel Specified key was too long 解决方案
- matlab在DSP中的应用(五)---离散傅里叶变换DFT
- C#闭包函数
- Fragment之ToolBar
- POJ 1276
- Ubuntu下Tensorflow安装遇到的问题
- Java 可变长度参数
- Unity移动端性能优化
- 粗糙集分类