Skip to content

Test mysql & sqlite

Kevin Morris requested to merge kevr/aurweb:pu_mysql_test into pu

First off: This commit set changes the default development database backend to mysql. sqlite, however, is still completely supported with the caveat that a user must now modify to use the sqlite backend.

While looking into this, it was discovered that our SQLAlchemy backend for mysql (mysql-connector) completely broke model attributes when we switched to utf8mb4_bin (binary) -- it does not correct the correct conversion to and from binary utf8mb4.

The new, replacement dependency mysqlclient does. mysqlclient is also recommended in SQLAlchemy documentation as the "best" one available.

The mysqlclient backend uses a different exception flow then sqlite, and so models now raise IntegrityError when it finds problematic nulls (to centralize the exception logic).

In addition, now mysql and sqlite are both tested in CI. Docker hasn't been modified yet due to incoming changes to its config.

Edited by Kevin Morris

Merge request reports