statify icon indicating copy to clipboard operation
statify copied to clipboard

Optimizing creation/config of SQL tables

Open Zodiac1978 opened this issue 4 years ago • 2 comments

There is a reported issue with creating the tables in the forums: https://wordpress.org/support/topic/keine-anziege-von-daten/ Unfortunately the person is not tech savy and switched already to another plugin. No further information besides the (small) hoster name.

And I also have found an issue on a client website: The table is set to "latin1_german1_ci", which could be the default on the server. I was wondering if we should set this to UTF-8 or not.

Zodiac1978 avatar Feb 10 '21 11:02 Zodiac1978

Potentially related to #105 (Database error for MySQL InnoDB database without innodb_large_prefix extension).

And I also have found an issue on a client website: The table is set to "latin1_german1_ci", which could be the default on the server. I was wondering if we should set this to UTF-8 or not.

We do not provide any specific charset or collate during creation, so we rely on the database default. We should align with WP standards for creation, which is utf8mb4 since 4.2.

We could try to convert the table with an Update, e.g using maybe_convert_table_to_utf8mb4 or custom SQL, if possible.

stklcode avatar Feb 10 '21 19:02 stklcode

How about adding COLLATE {$wpdb_collate} at table creation? This would not help for existing site, but for new installs.

2ndkauboy avatar Mar 18 '23 11:03 2ndkauboy