Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes

// Solution 1
// In App/Providers/AppServiceProvider.php

use IlluminateSupportFacadesSchema;

public function boot()
{
    Schema::defaultStringLength(191);
}


// Solution 2
// In config/database.php
// For 'mysql' change

'mysql' => [
			// 'engine' => null,
            'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
        ],
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Syntax #error #access #Specified #key #max #key #length #bytes
ADD COMMENT
Topic
Name
7+5 =