diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-09-10 20:06:10 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-09-10 20:06:10 +0000 |
| commit | 8d6c2517315660fbf9e69ae6b7595f33a10e5e43 (patch) | |
| tree | 87533aeb8567bc0770addc7abc0c050f40bd45ee /docs | |
| parent | dafb4951a7ff191f1b41146ca46b4cc662212997 (diff) | |
Fixed #16592 -- More test changes and documentation to account for MySQL's casual relationship with sanity. Thanks to Jim Dalton for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/databases.txt | 13 | ||||
| -rw-r--r-- | docs/ref/models/options.txt | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index d9ea008521..24f5bee0d0 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -326,6 +326,19 @@ storage engine, you have a couple of options. .. _AlterModelOnSyncDB: http://code.djangoproject.com/wiki/AlterModelOnSyncDB +Table names +----------- + +There are `known issues`_ in even the latest versions of MySQL that can cause the +case of a table name to be altered when certain SQL statements are executed +under certain conditions. It is recommended that you use lowercase table +names, if possible, to avoid any problems that might arise from this behavior. +Django uses lowercase table names when it auto-generates table names from +models, so this is mainly a consideration if you are overriding the table name +via the :class:`~django.db.models.Options.db_table` parameter. + +.. _known issues: http://bugs.mysql.com/bug.php?id=48875 + Notes on specific fields ------------------------ diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index cf1b3f97e4..010d93d9a3 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -61,6 +61,13 @@ 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 + + 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 + backend. See the :ref:`MySQL notes <mysql-notes>` for more details. + + ``db_tablespace`` ----------------- |
