1

I checked this solution. #1071 - Specified key was too long; max key length is 1000 bytes But I want to know how to do this in laravel migration file as I can't do it directly in mysql, I need a solution which can change the length of the index columns in migration file.

KEY `index` (`parent_menu_id`,`menu_link`(50),`plugin`(50),`alias`(50))
Imran Farooq
  • 115
  • 2
  • 10
  • 1
    have a look here https://stackoverflow.com/questions/8746207/1071-specified-key-was-too-long-max-key-length-is-1000-bytes – Sohel0415 Apr 01 '18 at 10:59
  • Possible duplicate of [#1071 - Specified key was too long; max key length is 1000 bytes](https://stackoverflow.com/questions/8746207/1071-specified-key-was-too-long-max-key-length-is-1000-bytes) – glennsl Apr 01 '18 at 11:40
  • `$table->index([ "key1", \DB::raw("key2(50)")]);` might work. – apokryfos Apr 03 '18 at 07:07

0 Answers0