mirror of
https://github.com/django/django.git
synced 2025-05-29 18:26:29 +00:00
[1.8.x] Refs #2495 -- Documented that MySQL cannot have TextField(unique=True).
Backport of e8cbc2b322d873a6fe39faca18d340ce93035087 from master
This commit is contained in:
parent
b7042576f9
commit
4f83bfa9e5
@ -500,6 +500,14 @@ for the field. This affects :class:`~django.db.models.CharField`,
|
|||||||
:class:`~django.db.models.SlugField` and
|
:class:`~django.db.models.SlugField` and
|
||||||
:class:`~django.db.models.CommaSeparatedIntegerField`.
|
:class:`~django.db.models.CommaSeparatedIntegerField`.
|
||||||
|
|
||||||
|
``TextField`` limitations
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
MySQL can index only the first N chars of a ``BLOB`` or ``TEXT`` column. Since
|
||||||
|
``TextField`` doesn't have a defined length, you can't mark it as
|
||||||
|
``unique=True``. MySQL will report: "BLOB/TEXT column '<db_column>' used in key
|
||||||
|
specification without a key length".
|
||||||
|
|
||||||
.. _mysql-fractional-seconds:
|
.. _mysql-fractional-seconds:
|
||||||
|
|
||||||
Fractional seconds support for Time and DateTime fields
|
Fractional seconds support for Time and DateTime fields
|
||||||
|
Loading…
x
Reference in New Issue
Block a user