From fd1d986bb115db44ddd242ca1f7f73c604b60b18 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 3 Sep 2008 06:14:13 +0000 Subject: Fixed #8802 -- Documented MySQL's usage of 1/0 instead of True/False for model BooleanFields. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8910 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/databases.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/ref/databases.txt') diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index 66bb836ccc..e484dfd29e 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -228,6 +228,16 @@ storage engine, you have a couple of options. .. _AlterModelOnSyncDB: http://code.djangoproject.com/wiki/AlterModelOnSyncDB +Boolean fields in Django +------------------------- + +Since MySQL doesn't have a direct ``BOOLEAN`` column type, Django uses a +``TINYINT`` column with values of ``1`` and ``0`` to store values for the +:class:`~django.db.models.BooleanField` model field. Refer to the documentation +of that field for more details, but usually this won't be something that will +matter unless you're printing out the field values and are expecting to see +``True`` and ``False.``. + .. _oracle-notes: -- cgit v1.3