Fixed #19709 -- Fixed TimeField introspection on MySQL

Thanks Eugene Grachev for the report.
This commit is contained in:
Claude Paroz 2013-01-31 20:40:53 +01:00
parent eb03fe1642
commit 3c0a81aaf0
2 changed files with 2 additions and 5 deletions

View File

@ -21,6 +21,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
FIELD_TYPE.LONGLONG: 'BigIntegerField',
FIELD_TYPE.SHORT: 'IntegerField',
FIELD_TYPE.STRING: 'CharField',
FIELD_TYPE.TIME: 'TimeField',
FIELD_TYPE.TIMESTAMP: 'DateTimeField',
FIELD_TYPE.TINY: 'IntegerField',
FIELD_TYPE.TINY_BLOB: 'TextField',

View File

@ -87,11 +87,7 @@ class InspectDBTestCase(TestCase):
else:
assertFieldType('field19', "models.IntegerField()")
assertFieldType('field20', "models.TextField()")
if connection.vendor == 'mysql':
# Ticket #19709
assertFieldType('field21', "models.TextField() # This field type is a guess.")
else:
assertFieldType('field21', "models.TimeField()")
assertFieldType('field21', "models.TimeField()")
# URLField
assertFieldType('field22', "models.CharField(max_length=200)")