diff options
| author | Rohit <rjha@ph.iitr.ac.in> | 2020-02-08 22:21:31 +0530 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-03-20 12:28:10 +0100 |
| commit | 2695ac8e0441b4d7e5460eac3bb7ea315164a6bf (patch) | |
| tree | 71df528790f275a1877123f79fb7bd4e8a097b52 /docs/ref/databases.txt | |
| parent | c1c361677d9400c8e2cdaddda0c16086bb358492 (diff) | |
Fixed #31144 -- Relaxed system check for max_length of CharFields on MySQL/MariaDB by turning into a warning.
Diffstat (limited to 'docs/ref/databases.txt')
| -rw-r--r-- | docs/ref/databases.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index f61158c191..4d4a7d2aa9 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -581,13 +581,18 @@ these methods in no-op's based in the results of such detection. Notes on specific fields ------------------------ +.. _mysql-character-fields: + Character fields ~~~~~~~~~~~~~~~~ -Any fields that are stored with ``VARCHAR`` column types have their +Any fields that are stored with ``VARCHAR`` column types may have their ``max_length`` restricted to 255 characters if you are using ``unique=True`` for the field. This affects :class:`~django.db.models.CharField`, -:class:`~django.db.models.SlugField`. +:class:`~django.db.models.SlugField`. See `the MySQL documentation`_ for more +details. + +.. _the MySQL documentation: https://dev.mysql.com/doc/refman/en/create-index.html#create-index-column-prefixes ``TextField`` limitations ~~~~~~~~~~~~~~~~~~~~~~~~~ |
