summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-08-27 09:29:13 -0400
committerTim Graham <timograham@gmail.com>2015-08-27 09:30:29 -0400
commit4f83bfa9e5ef10c6c9711ad529630d09a06ef413 (patch)
tree51b0685dc5711313d7a792aa3abf1aadb21ee754 /docs
parentb7042576f97b7846d0ed89def32ae3f1f479855c (diff)
[1.8.x] Refs #2495 -- Documented that MySQL cannot have TextField(unique=True).
Backport of e8cbc2b322d873a6fe39faca18d340ce93035087 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/databases.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index 1b601234bf..227b5b7921 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -500,6 +500,14 @@ for the field. This affects :class:`~django.db.models.CharField`,
:class:`~django.db.models.SlugField` and
: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:
Fractional seconds support for Time and DateTime fields