Difference between revisions of "Store filenames with emoticons"

From LogicalDOC Community Wiki
Jump to navigationJump to search
Line 8: Line 8:
 
</pre>
 
</pre>
  
Check the status of the charset settings with the query below
+
Check the status of the charset and collation settings are OK with the query below
 
<syntaxhighlight lang="SQL">
 
<syntaxhighlight lang="SQL">
 
  SHOW VARIABLES LIKE 'char%';
 
  SHOW VARIABLES LIKE 'char%';
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
[[File:Mysql8-charset-for-emoticons.png|frame]]
  
 
Execute the following SQL statements on the relevant field of the tables: ld_document, ld_version, ld_history
 
Execute the following SQL statements on the relevant field of the tables: ld_document, ld_version, ld_history

Revision as of 10:07, 18 September 2019

You must have a MySQL 8/MariaDB database with utf8md4 settings

Since this is not a risk-free operation it is necessary to back up the database before proceeding.

Connect to the database using mysql client

mysql -u root -p logicaldoc

Check the status of the charset and collation settings are OK with the query below

 SHOW VARIABLES LIKE 'char%';
Mysql8-charset-for-emoticons.png

Execute the following SQL statements on the relevant field of the tables: ld_document, ld_version, ld_history

ALTER TABLE
    ld_document
    CHANGE ld_filename ld_filename
    VARCHAR(255)
    CHARACTER SET utf8mb4
    COLLATE utf8mb4_unicode_ci;

ALTER TABLE
    ld_version
    CHANGE ld_filename ld_filename
    VARCHAR(255)
    CHARACTER SET utf8mb4
    COLLATE utf8mb4_unicode_ci;


ALTER TABLE
    ld_history
    CHANGE ld_filename ld_filename
    VARCHAR(255)
    CHARACTER SET utf8mb4
    COLLATE utf8mb4_unicode_ci;