From 04fd798d1c7b22e585b1e60b5768309d30b5a831 Mon Sep 17 00:00:00 2001 From: Ed Shrooma <46221543+Ed-shrooma@users.noreply.github.com> Date: Fri, 14 Apr 2023 00:31:57 +0100 Subject: [PATCH] Update database.php fixed error which didnt let create mysql tables on installing and updating. 2014_10_12_000000_create_users_table ..................................................................... 34ms FAIL In Connection.php line 760: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (S QL: alter table `users` add unique `users_email_unique`(`email`)) In Connection.php line 545: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes --- config/database.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/database.php b/config/database.php index 137ad18..c1a7a6c 100644 --- a/config/database.php +++ b/config/database.php @@ -52,12 +52,12 @@ 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), - 'charset' => 'utf8mb4', - 'collation' => 'utf8mb4_unicode_ci', + 'charset' => 'utf8', + 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'prefix_indexes' => true, 'strict' => true, - 'engine' => null, + 'engine' =>'InnoDB' , 'options' => extension_loaded('pdo_mysql') ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [],