Code

Ticket #1500: mysql_autofield_patch.diff

File mysql_autofield_patch.diff, 663 bytes (added by ejf-django@…, 8 years ago)

Patch for ticket #1500

Line 
1Index: django/core/db/backends/mysql.py
2===================================================================
3--- django/core/db/backends/mysql.py    (revision 2529)
4+++ django/core/db/backends/mysql.py    (working copy)
5@@ -172,7 +172,7 @@
6 # be interpolated against the values of Field.__dict__ before being output.
7 # If a column type is set to None, it won't be included in the output.
8 DATA_TYPES = {
9-    'AutoField':         'mediumint(9) unsigned auto_increment',
10+    'AutoField':         'integer AUTO_INCREMENT',
11     'BooleanField':      'bool',
12     'CharField':         'varchar(%(maxlength)s)',
13     'CommaSeparatedIntegerField': 'varchar(%(maxlength)s)',