From 6ae4def03b600a515f5715c3842d618d2fa1e84b Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 17 Jul 2005 17:22:17 +0000 Subject: [PATCH] Fixed #42 -- OneToOneField now works with SQL generation git-svn-id: http://code.djangoproject.com/svn/django/trunk@156 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/db/backends/mysql.py | 1 + django/core/db/backends/postgresql.py | 1 + 2 files changed, 2 insertions(+) diff --git a/django/core/db/backends/mysql.py b/django/core/db/backends/mysql.py index c51b357bec..3c0924e53f 100644 --- a/django/core/db/backends/mysql.py +++ b/django/core/db/backends/mysql.py @@ -95,6 +95,7 @@ DATA_TYPES = { 'IPAddressField': 'char(15)', 'ManyToManyField': None, 'NullBooleanField': 'bool', + 'OneToOneField': 'integer', 'PhoneNumberField': 'varchar(20)', 'PositiveIntegerField': 'integer UNSIGNED', 'PositiveSmallIntegerField': 'smallint UNSIGNED', diff --git a/django/core/db/backends/postgresql.py b/django/core/db/backends/postgresql.py index 8de25f0d57..ded611376d 100644 --- a/django/core/db/backends/postgresql.py +++ b/django/core/db/backends/postgresql.py @@ -105,6 +105,7 @@ DATA_TYPES = { 'IPAddressField': 'inet', 'ManyToManyField': None, 'NullBooleanField': 'boolean', + 'OneToOneField': 'integer', 'PhoneNumberField': 'varchar(20)', 'PositiveIntegerField': 'integer CHECK (%(name)s >= 0)', 'PositiveSmallIntegerField': 'smallint CHECK (%(name)s >= 0)',