Migration Error on Heroku production.ERROR: SQLSTATE[22023]: Invalid parameter value: 7 ERROR: invalid value for parameter "client_encoding": "utf8mb4"
Uploaded a web project to heroku successfully, but after running composer install and php artisan migrate i get *production.ERROR: SQLSTATE[22023]: Invalid parameter value: 7 ERROR: invalid value for parameter "client_encoding": "utf8mb4". Please help!
Check in config/database.php that (i) the correct default connection is being used in production and (ii) that the connection charset is utf8 and not utf8mb4
Heroku default sets charset to utf8mb4 whiles Laravel sets it to utf8. But it wouldn't work unless the DB_CONNECTION env variable is set to DB_CONNECTION=pgsql. Because this is the only way you can reference the charset in the database configuration file for Postgres.
I encounterred the same error. How did you fix this? I tried to change to from utf8mb4 to utf8 but still not worked. Any solution? I tried to change my tables to utf8 but still not worked. Please help me.