0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Laravelのmigrationで詰まった話

Posted at

Laravelで、todoアプリを作成中です。
migrationのファイルを作成し、
ターミナルにて

$php artisan migrate

いざ!実行!

エラーが出ました。
エラー内容は以下の通りです。

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

指定されたキーが長すぎます。キーの最大長は767バイトです。と

参考にさせていただいた記事
https://qiita.com/beer_geek/items/6e4264db142745ea666f

mysqlをアップデートしました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?