diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-07-17 17:22:17 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-07-17 17:22:17 +0000 |
| commit | 6ae4def03b600a515f5715c3842d618d2fa1e84b (patch) | |
| tree | ffc55bd162784950d097e9d429058f44f27ca419 | |
| parent | 729fc547efe639043461aaf1d369a467400df7cb (diff) | |
Fixed #42 -- OneToOneField now works with SQL generation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/db/backends/mysql.py | 1 | ||||
| -rw-r--r-- | django/core/db/backends/postgresql.py | 1 |
2 files changed, 2 insertions, 0 deletions
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)', |
