laravel 运行migrate报错 1071 Specified key was too long
laravel运行命令migrate时报错:
1071 Specified key was too long; max key length is 1000 bytes (S
解决:
升级MySql版本到5.5.3以上。
手动配置迁移命令
migrate生成的默认字符串长度,App/Providers/AppServiceProvider.php<?php
namespace App\Providers; use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema; class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
laravel 运行migrate报错 1071 Specified key was too long的更多相关文章
- 【laravel5.4】php artisan migrate报错:Specified key was too long; max key length is 767 bytes
1.原因:在进行 迁移文件生成时,程序并未给varchar类型字段设置 合适的长度,导致报错. 2.解决办法:找到database/ 目标迁移文件,修改其中类型为string的字段长度,建议不要超过2 ...
- laravel报错1071 Specified key was too long; max key length is 1000 bytes
Laravel 默认使用utf8mb4字符编码,而不是的utf8编码.因此运行php artisan migrate会出现如下错误: [Illuminate\Database\QueryExcepti ...
- Mac上PyCharm运行多进程报错的解决方案
Mac上PyCharm运行多进程报错的解决方案 运行时报错 may have been in progress in another thread when fork() was called. We ...
- 在ios7真机上和iOS6模拟器上运行是好的,而在iOS6真机上运行却报错
在ios7真机上和iOS6模拟器上运行是好的,而在iOS6真机上运行却报错 解决方法: 或是都设置为yes.. Build Active Architecture Only的意思是只生成适应的指令集
- 运行yum报错Error: Cannot retrieve metalink for reposit
http://www.netpc.com.cn/593.html 运行yum报错Error: Cannot retrieve metalink for reposit 今天给Centos通过rpm - ...
- 转:运行yum报错Error: Cannot retrieve metalink for reposit
http://www.netpc.com.cn/593.html 运行yum报错Error: Cannot retrieve metalink for repository: epel. Please ...
- 新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo
新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo ...
- django migrate报错(提前删除表等)
python3 manage.py makemigrations python3 manage.py migrate ##报错 改为##更改migrates的状态 python3 manage.py ...
- laravel安装一直报错
laravel安装一直报错 原因: 1.找到php版本是否对应 2.缺少第三方扩展库vendor 需要composer update 解决链接:https://learnku.com/docs/lar ...
随机推荐
- hdu 1576扩展欧几里得算法
#include<stdio.h> #define ll long long /* 2.那么x,y的一组解就是x1*m1,y1*m1,但是由于满足方程的解无穷多个, 在实际的解题中一般都会 ...
- 第三篇:SpringBoot - 数据库结构版本管理与迁移
SpringBoot支持了两种数据库结构版本管理与迁移,一个是flyway,一个是liquibase.其本身也支持sql script,在初始化数据源之后执行指定的脚本,本章是基于 Liquibase ...
- Javascript 基础夯实 —— 使用 webWorker 实现多线程(转)
原文链接:https://zhuanlan.zhihu.com/p/29219879 当我们开始学习 javascript 的时候,我们就知道 js 其实是单线程的,所以当我们在浏览器中运行某些耗时算 ...
- linux 7.2 下安装maven
由于现有项目采用maven打包所以需要安装maven 1.创建目录 mkdir /maven cd /maven 2.下载解压maven,这里选择maven版本为3.5.3 wget http://m ...
- RestTemplate使用详解
1.RestTemplate添加RequestHeader如content-type可通过httpclient设置 List<Header> headers = new ArrayList ...
- Think In java 笔记一
本博客不再更新,很多其它精彩内容请訪问我的独立博客 今天起要读这本书了,曾经都没有认真读过书.是时候改变自己了. 如今认为不是写不出代码,而是没有想法,没有架构,要做一个大神不是写多少代码.而是要能做 ...
- oralce sql 创建指定时间段内的日历信息
-- Create table create table TEMP_CALENDAR ( MONTH VARCHAR2(6), W_7 VARCHAR2(2), W_1 VARCH ...
- 【待解决】maven创建web报Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins
Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:maven-war-plugin:maven- ...
- 创建quickstart报错
在cmd中创建helloword成功(一开始是mvn package失败,后面又执行了一遍又成功了,应该是网络问题) 然后在eclipse 中创建quickstart,结果pom报错找不到如下包 ma ...
- 分布式设计《初尝memcached》
之前听说过高性能的分布式缓存开源工具,但一直没有真正接触过,如今接触的产品中实用到过分布式缓存.所以决定一探到底.memcached是一个优秀的开源的分布式缓存工具.也是眼下比較火热的分布 ...