Fix possible MySQL index length issue when using MyISAM engine in WAMP

This commit is contained in:
Bubka 2022-04-04 09:23:23 +02:00
parent 420fa7dd88
commit 0999ad5a24
2 changed files with 7 additions and 1 deletions

View File

@ -31,7 +31,11 @@ public function register()
public function boot()
{
Blade::withoutComponentTags();
// Limited to 191 to prevent index length issue with MyISAM and utf8mb4_unicode_ci
// when using WAMP (WAMP uses MyISAM as default engine in place of INNOdb)
Schema::defaultStringLength(191);
JsonResource::withoutWrapping();
$this->commands([

View File

@ -16,7 +16,9 @@ public function up()
{
Schema::create('web_authn_credentials', function (Blueprint $table) {
$table->string('id', 255);
// Limited to 191 to prevent index length issue with MyISAM and utf8mb4_unicode_ci
// when using WAMP (WAMP uses MyISAM as default engine in place of INNOdb)
$table->string('id', 191);
// Change accordingly for your users table if you need to.
$table->unsignedBigInteger('user_id');