Probably not a Bug really, but php artisan migrage throws an error depending up MySQL
sscotti opened this issue · 2 comments
Have NameCheap as a hosting service for some projects.
Syntax error or access violation: 1071 Specified key was too long occurs when doing: php artisan migrate.
Fix is to add the following to the AppServiceProvider.php
use Illuminate\Support\Facades\Schema;
public function boot()
{
Paginator::useBootstrap();
Schema::defaultStringLength(191);
}
}
That bug has to be 5 or more years old at this point (Laravel 5.4 I believe). We had that in our AppServiceProvider for the longest time. It was removed when we figured no one would be running such old versions of MySQL anymore (< 5.7.7) the current latest version is 8. If you're getting this error you are on at least 5.6 which is no longer supported:
Thought so. I think it is my hosting service MySQL version. I run Docker for development with a mysql container and that doesn't seem to be a problem. Thanks.