We have updated MariaDB and are advised to use the unicode collation (utf8mb4_unicode_520_ci). We are not English so we can see benefit in this. Upon conversion this two errors appears for the ‘company_gateways’ and ‘gateways’ tables:
Cannot change column 'gateway_key': used in a foreign key constraint 'company_gateways_gateway_key_foreign' Cannot change column 'key': used in a foreign key constraint 'invoiceninja/company_gateways_gateway_key_foreign' of table 'invoiceninja/company_gateways'
Disable foreign key checks does not help and the same errors appears.
To reproduce run:
ALTER TABLE invoiceninja.company_gateways CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; ALTER TABLE invoiceninja.gateways CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
(‘invoiceninja’ is the database name)
How to safely convert these two tables? All others are fine.
Thank you kindly.