From eb107e1ae95e180b07ac19915d2e50527d203d87 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Fri, 20 Apr 2007 10:05:39 +0000 Subject: [PATCH] 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 --- AUTHORS | 1 + django/db/backends/mysql/introspection.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 002d884638b18..7fa7981aab287 100644 --- a/AUTHORS +++ b/AUTHORS @@ -88,6 +88,7 @@ answer newbie questions, and generally made Django that much better: Dirk Eschler Marc Fargas favo@exoweb.net + Bill Fenner Matthew Flanagan Eric Floehr Jorge Gajon diff --git a/django/db/backends/mysql/introspection.py b/django/db/backends/mysql/introspection.py index 7829457fa99b8..558fe4978713b 100644 --- a/django/db/backends/mysql/introspection.py +++ b/django/db/backends/mysql/introspection.py @@ -85,7 +85,7 @@ def get_indexes(cursor, table_name): 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',