From e2c2be7d71fd6acd797ef5cea90cf40501ea311d Mon Sep 17 00:00:00 2001 From: FreeScout Date: Tue, 18 Sep 2018 00:37:34 -0700 Subject: [PATCH] Fix error in migration on MariaDB: Specified key was too long --- .../migrations/2018_07_09_053559_create_customers_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/migrations/2018_07_09_053559_create_customers_table.php b/database/migrations/2018_07_09_053559_create_customers_table.php index b33baa53..5219be38 100644 --- a/database/migrations/2018_07_09_053559_create_customers_table.php +++ b/database/migrations/2018_07_09_053559_create_customers_table.php @@ -39,7 +39,7 @@ class CreateCustomersTable extends Migration // Indexes // For ajax search - $table->index(['first_name', 'last_name']); + $table->index([DB::raw('first_name(191)'), DB::raw('last_name(191)')]); }); }