Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #42 -- OneToOneField now works with SQL generation

git-svn-id: http://code.djangoproject.com/svn/django/trunk@156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 6ae4def03b600a515f5715c3842d618d2fa1e84b 1 parent 729fc54
@adrianholovaty adrianholovaty authored
View
1  django/core/db/backends/mysql.py
@@ -95,6 +95,7 @@ def get_last_insert_id(cursor, table_name, pk_name):
'IPAddressField': 'char(15)',
'ManyToManyField': None,
'NullBooleanField': 'bool',
+ 'OneToOneField': 'integer',
'PhoneNumberField': 'varchar(20)',
'PositiveIntegerField': 'integer UNSIGNED',
'PositiveSmallIntegerField': 'smallint UNSIGNED',
View
1  django/core/db/backends/postgresql.py
@@ -105,6 +105,7 @@ def get_last_insert_id(cursor, table_name, pk_name):
'IPAddressField': 'inet',
'ManyToManyField': None,
'NullBooleanField': 'boolean',
+ 'OneToOneField': 'integer',
'PhoneNumberField': 'varchar(20)',
'PositiveIntegerField': 'integer CHECK (%(name)s >= 0)',
'PositiveSmallIntegerField': 'smallint CHECK (%(name)s >= 0)',
Please sign in to comment.
Something went wrong with that request. Please try again.