Reputation: 558
I am importing a MySQL database in shared hosting but I am unable to import the structure of tables properly. After importing, for all tables, there are no primary and foreign keys are coming only data is imported. In between, I will get an error like
1071 - Specified key was too long; max key length is 767 bytes
Upvotes: 1
Views: 96
Reputation: 895
add this to you AppServiceProvider.
use Schema;
then add this to boot()
function
Schema::defaultStringLength(191);
However if you really want to maximize the 255 VARCHAR default length of your database. you need to manage your database setting first.
Upvotes: 1