Search code examples
djangomariadbcompatibility

Django versions and database support (MariaDB)


Based on the release notes of Django, it seems that:

  • Support for Mysql 5.5 is dropped in Django 2.1
  • Support for MariaDB 10.1 and higher is added in Django 3.0

We currently use Django 2.0 with MariaDB 5.5, we'd like to upgrade to Django 3.0 and MariaDB 10.4.

What would be the suggested upgradepath to get to the latest version of Django and MariaDB?

Is Django 2.1 and 2.2 compatible with MariaDB 5.5 and should we upgrade to Django before upgrading MariaDB?

Or is unofficial support for MariaDB 10.x sufficient in Django 2.1 and Django 2.2 and should we just upgrade to MariaDB to 10.4 first?


Solution

  • The "added support" for MariaDB is mostly in name only (https://code.djangoproject.com/ticket/29548 and https://github.com/django/django/commit/b6c4766f53cf00bcf63cc2aa8be977c8589d083e) and is achieved through the mysql database backend. Assuming you are using the recommended mysqlclient version (1.3.13 or later) the safest upgrade strategy would be to first upgrade MariaDB 10.4.

    Once that works I would recommend reading (and following) Django's upgrading docs: https://docs.djangoproject.com/en/3.0/howto/upgrade-version/ to get to Django 3.0