diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-04-20 10:05:39 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-04-20 10:05:39 +0000 |
| commit | eb107e1ae95e180b07ac19915d2e50527d203d87 (patch) | |
| tree | ff63b557705fc70c981d37ed515d0ee371df0055 | |
| parent | fe24ddbfcb269e182d6d03adb6fd1bff38395f25 (diff) | |
Fixed #4048 -- When introspecting a MySQL database, map CHAR(n) fields to
Django's CharField type, not TextField. Thanks, Bill Fenner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | AUTHORS | 1 | ||||
| -rw-r--r-- | django/db/backends/mysql/introspection.py | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -88,6 +88,7 @@ answer newbie questions, and generally made Django that much better: Dirk Eschler <dirk.eschler@gmx.net> Marc Fargas <telenieko@telenieko.com> favo@exoweb.net + Bill Fenner <fenner@gmail.com> Matthew Flanagan <http://wadofstuff.blogspot.com> Eric Floehr <eric@intellovations.com> Jorge Gajon <gajon@gajon.org> diff --git a/django/db/backends/mysql/introspection.py b/django/db/backends/mysql/introspection.py index 7829457fa9..558fe49787 100644 --- a/django/db/backends/mysql/introspection.py +++ b/django/db/backends/mysql/introspection.py @@ -85,7 +85,7 @@ DATA_TYPES_REVERSE = { FIELD_TYPE.LONG: 'IntegerField', FIELD_TYPE.LONGLONG: 'IntegerField', FIELD_TYPE.SHORT: 'IntegerField', - FIELD_TYPE.STRING: 'TextField', + FIELD_TYPE.STRING: 'CharField', FIELD_TYPE.TIMESTAMP: 'DateTimeField', FIELD_TYPE.TINY: 'IntegerField', FIELD_TYPE.TINY_BLOB: 'TextField', |
