web/lib/django/db/backends/oracle/introspection.py
changeset 29 cc9b7e14412b
parent 0 0d40e90630ef
equal deleted inserted replaced
28:b758351d191f 29:cc9b7e14412b
    27         pass
    27         pass
    28 
    28 
    29     def get_field_type(self, data_type, description):
    29     def get_field_type(self, data_type, description):
    30         # If it's a NUMBER with scale == 0, consider it an IntegerField
    30         # If it's a NUMBER with scale == 0, consider it an IntegerField
    31         if data_type == cx_Oracle.NUMBER and description[5] == 0:
    31         if data_type == cx_Oracle.NUMBER and description[5] == 0:
    32             return 'IntegerField'
    32             if description[4] > 11:
       
    33                 return 'BigIntegerField'
       
    34             else:
       
    35                 return 'IntegerField'
    33         else:
    36         else:
    34             return super(DatabaseIntrospection, self).get_field_type(
    37             return super(DatabaseIntrospection, self).get_field_type(
    35                 data_type, description)
    38                 data_type, description)
    36 
    39 
    37     def get_table_list(self, cursor):
    40     def get_table_list(self, cursor):