django1/django/db/backends/oracle/creation.py

27 lines
1002 B
Python
Raw Normal View History

DATA_TYPES = {
'AutoField': 'number(38)',
'BooleanField': 'number(1)',
'CharField': 'varchar2(%(maxlength)s)',
'CommaSeparatedIntegerField': 'varchar2(%(maxlength)s)',
'DateField': 'date',
'DateTimeField': 'date',
'DecimalField': 'number(%(max_digits)s, %(decimal_places)s)',
'FileField': 'varchar2(100)',
'FilePathField': 'varchar2(100)',
'FloatField': 'double precision',
'ImageField': 'varchar2(100)',
'IntegerField': 'integer',
'IPAddressField': 'char(15)',
'ManyToManyField': None,
'NullBooleanField': 'integer',
'OneToOneField': 'integer',
'PhoneNumberField': 'varchar(20)',
'PositiveIntegerField': 'integer',
'PositiveSmallIntegerField': 'smallint',
'SlugField': 'varchar(50)',
'SmallIntegerField': 'smallint',
'TextField': 'long',
'TimeField': 'timestamp',
'USStateField': 'varchar(2)',
}