Browse Source

Refs #29548 -- Updated docs for MariaDB support.

Mariusz Felisiak 5 years ago
parent
commit
b6c4766f53

+ 0 - 1
django/db/backends/mysql/base.py

@@ -340,5 +340,4 @@ class DatabaseWrapper(BaseDatabaseWrapper):
 
     @cached_property
     def mysql_is_mariadb(self):
-        # MariaDB isn't officially supported.
         return 'mariadb' in self.mysql_server_info.lower()

+ 3 - 1
docs/faq/install.txt

@@ -30,10 +30,12 @@ popular alternatives.
 
 If you want to use Django with a database, which is probably the case, you'll
 also need a database engine. PostgreSQL_ is recommended, because we're
-PostgreSQL fans, and MySQL_, `SQLite`_, and Oracle_ are also supported.
+PostgreSQL fans, and MariaDB_, MySQL_, `SQLite`_, and Oracle_ are also
+supported.
 
 .. _Python: https://www.python.org/
 .. _PostgreSQL: https://www.postgresql.org/
+.. _MariaDB: https://mariadb.org/
 .. _MySQL: https://www.mysql.com/
 .. _`SQLite`: https://www.sqlite.org/
 .. _Oracle: https://www.oracle.com/

+ 2 - 2
docs/intro/install.txt

@@ -31,8 +31,8 @@ Set up a database
 =================
 
 This step is only necessary if you'd like to work with a "large" database engine
-like PostgreSQL, MySQL, or Oracle. To install such a database, consult the
-:ref:`database installation information <database-installation>`.
+like PostgreSQL, MariaDB, MySQL, or Oracle. To install such a database, consult
+the :ref:`database installation information <database-installation>`.
 
 Install Django
 ==============

+ 3 - 3
docs/intro/tutorial02.txt

@@ -94,9 +94,9 @@ and creates any necessary database tables according to the database settings
 in your :file:`mysite/settings.py` file and the database migrations shipped
 with the app (we'll cover those later). You'll see a message for each
 migration it applies. If you're interested, run the command-line client for your
-database and type ``\dt`` (PostgreSQL), ``SHOW TABLES;`` (MySQL), ``.schema``
-(SQLite), or ``SELECT TABLE_NAME FROM USER_TABLES;`` (Oracle) to display the
-tables Django created.
+database and type ``\dt`` (PostgreSQL), ``SHOW TABLES;`` (MariaDB, MySQL),
+``.schema`` (SQLite), or ``SELECT TABLE_NAME FROM USER_TABLES;`` (Oracle) to
+display the tables Django created.
 
 .. admonition:: For the minimalists
 

+ 12 - 0
docs/ref/databases.txt

@@ -268,6 +268,18 @@ non-durable <https://www.postgresql.org/docs/current/non-durability.html>`_.
     a development machine where you can easily restore the entire contents of
     all databases in the cluster.
 
+.. _mariadb-notes:
+
+MariaDB notes
+=============
+
+.. versionadded:: 3.0
+
+Django supports MariaDB 10.1 and higher.
+
+To use MariaDB, use the MySQL backend, which is shared between the two. See the
+:ref:`MySQL notes <mysql-notes>` for more details.
+
 .. _mysql-notes:
 
 MySQL notes

+ 1 - 1
docs/ref/models/options.txt

@@ -72,7 +72,7 @@ If your database table name is an SQL reserved word, or contains characters that
 aren't allowed in Python variable names -- notably, the hyphen -- that's OK.
 Django quotes column and table names behind the scenes.
 
-.. admonition:: Use lowercase table names for MySQL
+.. admonition:: Use lowercase table names for MariaDB and MySQL
 
     It is strongly advised that you use lowercase table names when you override
     the table name via ``db_table``, particularly if you are using the MySQL

+ 1 - 1
docs/ref/settings.txt

@@ -487,7 +487,7 @@ SQLite. This can be configured using the following::
         }
     }
 
-When connecting to other database backends, such as MySQL, Oracle, or
+When connecting to other database backends, such as MariaDB, MySQL, Oracle, or
 PostgreSQL, additional connection parameters will be required. See
 the :setting:`ENGINE <DATABASE-ENGINE>` setting below on how to specify
 other database types. This example is for PostgreSQL::

+ 6 - 0
docs/releases/3.0.txt

@@ -38,6 +38,12 @@ compatible with Django 3.0.
 What's new in Django 3.0
 ========================
 
+MariaDB support
+---------------
+
+Django now officially supports `MariaDB <https://mariadb.org/>`_ 10.1 and
+higher. See :ref:`MariaDB notes <mariadb-notes>` for more details.
+
 Minor features
 --------------
 

+ 1 - 1
docs/topics/db/tablespaces.txt

@@ -69,7 +69,7 @@ stored in the model tablespace ``tables`` by default. The index for the
 Database support
 ================
 
-PostgreSQL and Oracle support tablespaces. SQLite and MySQL don't.
+PostgreSQL and Oracle support tablespaces. SQLite, MariaDB and MySQL don't.
 
 When you use a backend that lacks support for tablespaces, Django ignores all
 tablespace-related options.

+ 4 - 3
docs/topics/install.txt

@@ -69,8 +69,8 @@ Get your database running
 
 If you plan to use Django's database API functionality, you'll need to make
 sure a database server is running. Django supports many different database
-servers and is officially supported with PostgreSQL_, MySQL_, Oracle_ and
-SQLite_.
+servers and is officially supported with PostgreSQL_, MariaDB_, MySQL_, Oracle_
+and SQLite_.
 
 If you are developing a simple project or something you don't plan to deploy
 in a production environment, SQLite is generally the simplest option as it
@@ -89,7 +89,7 @@ database bindings are installed.
 * If you're using PostgreSQL, you'll need the `psycopg2`_ package. Refer to the
   :ref:`PostgreSQL notes <postgresql-notes>` for further details.
 
-* If you're using MySQL, you'll need a :ref:`DB API driver
+* If you're using MySQL or MariaDB, you'll need a :ref:`DB API driver
   <mysql-db-api-drivers>` like ``mysqlclient``. See :ref:`notes for the MySQL
   backend <mysql-notes>` for details.
 
@@ -116,6 +116,7 @@ If you're using Django's :doc:`testing framework</topics/testing/index>` to test
 database queries, Django will need permission to create a test database.
 
 .. _PostgreSQL: https://www.postgresql.org/
+.. _MariaDB: https://mariadb.org/
 .. _MySQL: https://www.mysql.com/
 .. _psycopg2: http://initd.org/psycopg/
 .. _SQLite: https://www.sqlite.org/