bug fixes on activity log and array_key_first alt using reset

This commit is contained in:
Kwesi Banson
2024-02-16 19:46:38 +00:00
parent d4ab479e0c
commit 7b3a29ca53
25 changed files with 579 additions and 160 deletions

20
common-fixes.md Normal file
View File

@@ -0,0 +1,20 @@
# Inability to insert emojis into DB tables
Step 1, change your database's default charset:
ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
if the db is not created yet, create it with correct encodings:
CREATE DATABASE database_name DEFAULT CHARSET = utf8mb4 DEFAULT COLLATE = utf8mb4_unicode_ci;
Step 2, set charset when creating table:
CREATE TABLE IF NOT EXISTS table_name (
...
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
or alter table
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE table_name MODIFY field_name TEXT CHARSET utf8mb4;
### Source
- https://stackoverflow.com/questions/39463134/how-to-store-emoji-character-in-mysql-database