You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table world_cities add index uniq_city(country_id, division_id, name))
This error occurred when php artisan world:init command is executed
The text was updated successfully, but these errors were encountered:
Hi @upeksha1996 you can try this solution it worked for me:
Option 1: Add the following to your my.ini Config file, I did it on XAMPP Control Panel > Config > my.ini and look for the InnoDB options and place this code below, restart MySQL and Apache and it should work.
Also you can try to update your app/Providers/AppServiceProvider.php
use Illuminate\Support\Facades\Schema; // Import Schema where defaultStringLength method is defined
public function boot()
{
Schema::defaultStringLength(191); // Update defaultStringLength
}
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table
world_cities
add indexuniq_city
(country_id
,division_id
,name
))This error occurred when php artisan world:init command is executed
The text was updated successfully, but these errors were encountered: