diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-08-25 11:24:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-25 11:24:21 +0200 |
| commit | 9c37103a98d030be110eb9ba8b7ed32a47240b28 (patch) | |
| tree | 1d62e36686845418b1206d9253df992f5c8cbd14 /docs | |
| parent | b7fe36ad37fb18c4bc7932c0aec6ae4f299b9622 (diff) | |
Refs #33507 -- Doc'd using UUID data type on MariaDB 10.7+ in UUIDField docs.
Follow up to 7cd187a5ba58d7769039f487faeb9a5a2ff05540.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/fields.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index e1575e61b2..ff67312949 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1463,8 +1463,8 @@ Like all :class:`CharField` subclasses, :class:`URLField` takes the optional .. class:: UUIDField(**options) A field for storing universally unique identifiers. Uses Python's -:class:`~python:uuid.UUID` class. When used on PostgreSQL, this stores in a -``uuid`` datatype, otherwise in a ``char(32)``. +:class:`~python:uuid.UUID` class. When used on PostgreSQL and MariaDB 10.7+, +this stores in a ``uuid`` datatype, otherwise in a ``char(32)``. Universally unique identifiers are a good alternative to :class:`AutoField` for :attr:`~Field.primary_key`. The database will not generate the UUID for you, so @@ -1481,12 +1481,13 @@ it is recommended to use :attr:`~Field.default`:: Note that a callable (with the parentheses omitted) is passed to ``default``, not an instance of ``UUID``. -.. admonition:: Lookups on PostgreSQL +.. admonition:: Lookups on PostgreSQL and MariaDB 10.7+ Using :lookup:`iexact`, :lookup:`contains`, :lookup:`icontains`, :lookup:`startswith`, :lookup:`istartswith`, :lookup:`endswith`, or :lookup:`iendswith` lookups on PostgreSQL don't work for values without - hyphens, because PostgreSQL stores them in a hyphenated uuid datatype type. + hyphens, because PostgreSQL and MariaDB 10.7+ store them in a hyphenated + uuid datatype type. Relationship fields =================== |
