knex-db-manager
knex-db-manager copied to clipboard
The encoding/charset is hard coded to 'utf8'
The encoding is hard coded to 'utf8', which can cause a ER_COLLATION_CHARSET_MISMATCH
error.
As 'utf8' is not compatible with a number of collations, e.g. the utf8mb4 variants, some of the functions will not work.
What it should do, is to use the one in config.knex.connection.charset
if specified, alternatively we can have a new entry config.dbManager.charset
.
I am speaking in the context of MySQL because I'm not too familiar with Postgres, but I guess it's probably the same.
Example -
https://github.com/Vincit/knex-db-manager/blob/8bd87a39f02fd62e5ba342c7b74ab07376a7803f/lib/MySqlDatabaseManager.js#L51
I would prefer config.dbManager.charset
feel free to send PR for this.