Langsung ke konten utama

Postingan

Menampilkan postingan dari Juli, 2018

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL)

Hello, good morning guys! Nice to meet you again. How are you today? Hahaha, I'm okay. Today I want to tell my experience when I use migration at laravel 5.6. There is some error when I make an migration with my new table. In this case this table is 'produk'. I was complete for make function up and down. But when I run 'php artisan migrate' there is an error. Liki this... C:\xampp1\htdocs\blog>php artisan migrate In Connection.php line 664:   SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQ   L: alter table `users` add unique `users_email_unique`(`email`)) In Connection.php line 458:   SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes Okay, don't worry about this problem. It just at Laravel 5.4 you must declarate how long your String tipe data. Okey let's follow the tutorial. First follow my insta