Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added warn note to docs about MySQL issues with 0000-00-00 date strings

MySQL accepts 0000-00-00 as a valid date but MySQLdb converts those
values into None. So there will be problems for instance if trying to
transport the data using dumpdata/loaddata.

This patch refs #6642 that has been closed as wontfix since this is a
particular problem of MySQL.
  • Loading branch information...
commit 36b45611bcaee0ba55b40384f29e8b6546f109bb 1 parent 31b5275
Juan Ignacio Catalano authored March 18, 2013

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  docs/ref/databases.txt
8  docs/ref/databases.txt
@@ -241,6 +241,14 @@ required for full MySQL support in Django.
241 241
     1.2.1p2 or newer, then delete the ``sets.py`` file in the MySQLdb
242 242
     directory that was left by an earlier version.
243 243
 
  244
+.. note::
  245
+    There are known issues with the way MySQLdb converts date strings into
  246
+    datetime objects. Specifically, date strings with value 0000-00-00 are valid for
  247
+    MySQL but will be converted into None by MySQLdb.
  248
+
  249
+    This means you should be careful while using loaddata/dumpdata with rows
  250
+    that may have 0000-00-00 values, as they will be converted to None.
  251
+
244 252
 .. _MySQLdb: http://sourceforge.net/projects/mysql-python
245 253
 
246 254
 Creating your database

0 notes on commit 36b4561

Please sign in to comment.
Something went wrong with that request. Please try again.