Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eb107e1

Browse files
committed
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
1 parent fe24ddb commit eb107e1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎AUTHORS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ answer newbie questions, and generally made Django that much better:
8888
Dirk Eschler <dirk.eschler@gmx.net>
8989
Marc Fargas <telenieko@telenieko.com>
9090
favo@exoweb.net
91+
Bill Fenner <fenner@gmail.com>
9192
Matthew Flanagan <http://wadofstuff.blogspot.com>
9293
Eric Floehr <eric@intellovations.com>
9394
Jorge Gajon <gajon@gajon.org>

‎django/db/backends/mysql/introspection.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_indexes(cursor, table_name):
8585
FIELD_TYPE.LONG: 'IntegerField',
8686
FIELD_TYPE.LONGLONG: 'IntegerField',
8787
FIELD_TYPE.SHORT: 'IntegerField',
88-
FIELD_TYPE.STRING: 'TextField',
88+
FIELD_TYPE.STRING: 'CharField',
8989
FIELD_TYPE.TIMESTAMP: 'DateTimeField',
9090
FIELD_TYPE.TINY: 'IntegerField',
9191
FIELD_TYPE.TINY_BLOB: 'TextField',

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /