Closed DavidLaridon closed 1 month ago
We don't mess around with charsets, and it's my understanding that Craft's migrations should convert all tables upon upgrade (if the database engine supports it).
Is this a fresh install of Hyper? As in, Hyper wasn't installed on Craft 4? If so, that's even stranger that it's not respecting your charset settings which are typically defined in your .env
file or your config/db.php
file.
Can you confirm the encoding and collation of your tables? Mine are set to DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
which I believe might be the default.
Found the issue. I had this environment variable, like it said in the upgrade docs:
CRAFT_DB_CHARACTER_SET=utf8mb4
But apparently the correct variable was CRAFT_DB_CHARSET
. Setting that to utf8mb4
fixed it.
Strange though, because all my tables were still encoded as utf8mb4
.
Thanks for your help!
Describe the bug
When installing, the Character set
utf8
is seen asutf8mb3
instead ofutf8mb4
. This causes the following error. I checked the DB and everything is set toutf8mb4
so not sure why it would fallback toutf8mb3
. I did do an upgrade from Craft 4 to Craft 5 though.Steps to reproduce
Craft CMS version
5.1.2
Plugin version
2.0.0-beta.8
Multi-site?
Yes
Additional context
Not sure if it is relevant, but i do use MariaDb as database for local dev.