Fixed #42 -- OneToOneField now works with SQL generation

git-svn-id: http://code.djangoproject.com/svn/django/trunk@156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-07-17 17:22:17 +00:00
parent 729fc547ef
commit 6ae4def03b
2 changed files with 2 additions and 0 deletions

View File

@ -95,6 +95,7 @@ DATA_TYPES = {
'IPAddressField': 'char(15)', 'IPAddressField': 'char(15)',
'ManyToManyField': None, 'ManyToManyField': None,
'NullBooleanField': 'bool', 'NullBooleanField': 'bool',
'OneToOneField': 'integer',
'PhoneNumberField': 'varchar(20)', 'PhoneNumberField': 'varchar(20)',
'PositiveIntegerField': 'integer UNSIGNED', 'PositiveIntegerField': 'integer UNSIGNED',
'PositiveSmallIntegerField': 'smallint UNSIGNED', 'PositiveSmallIntegerField': 'smallint UNSIGNED',

View File

@ -105,6 +105,7 @@ DATA_TYPES = {
'IPAddressField': 'inet', 'IPAddressField': 'inet',
'ManyToManyField': None, 'ManyToManyField': None,
'NullBooleanField': 'boolean', 'NullBooleanField': 'boolean',
'OneToOneField': 'integer',
'PhoneNumberField': 'varchar(20)', 'PhoneNumberField': 'varchar(20)',
'PositiveIntegerField': 'integer CHECK (%(name)s >= 0)', 'PositiveIntegerField': 'integer CHECK (%(name)s >= 0)',
'PositiveSmallIntegerField': 'smallint CHECK (%(name)s >= 0)', 'PositiveSmallIntegerField': 'smallint CHECK (%(name)s >= 0)',