diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-01-31 20:40:53 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-01-31 20:41:57 +0100 |
| commit | 3c0a81aaf0a4ba675f80d50c788aea706d0c812c (patch) | |
| tree | 71051b1c9023885316f0bae2544533dfc92e0eeb | |
| parent | eb03fe164277b3d7a2ff856415457176d6a2ee51 (diff) | |
Fixed #19709 -- Fixed TimeField introspection on MySQL
Thanks Eugene Grachev for the report.
| -rw-r--r-- | django/db/backends/mysql/introspection.py | 1 | ||||
| -rw-r--r-- | tests/regressiontests/inspectdb/tests.py | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/django/db/backends/mysql/introspection.py b/django/db/backends/mysql/introspection.py index 52e97baedb..0be99e08bb 100644 --- a/django/db/backends/mysql/introspection.py +++ b/django/db/backends/mysql/introspection.py @@ -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', diff --git a/tests/regressiontests/inspectdb/tests.py b/tests/regressiontests/inspectdb/tests.py index 5fa1eb1095..faf4f2fb2a 100644 --- a/tests/regressiontests/inspectdb/tests.py +++ b/tests/regressiontests/inspectdb/tests.py @@ -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)") |
