#489 closed defect (fixed)
[patch] MySQL: TextField => longtext
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | |
Severity: | trivial | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Django maps 'TextField' to MySQL's 'text', which cannot be longer than 64k. I already hit this limit with SQL-based cache. I think that 'longtext' is the better mapping choice. It can be as long as 4G. IMHO, 2 byte size difference is justified in this case.
Index: mysql.py =================================================================== --- mysql.py (revision 635) +++ mysql.py (working copy) @@ -129,7 +178,7 @@ 'PositiveSmallIntegerField': 'smallint UNSIGNED', 'SlugField': 'varchar(50)', 'SmallIntegerField': 'smallint', - 'TextField': 'text', + 'TextField': 'longtext', 'TimeField': 'time', 'URLField': 'varchar(200)', 'USStateField': 'varchar(2)',
Attachments (1)
Change History (4)
by , 19 years ago
Attachment: | mysql-2.patch added |
---|
comment:2 by , 19 years ago
Resolution: | fixed |
---|---|
Severity: | normal → trivial |
Status: | closed → reopened |
Sorry I missed it before: 'XMLField' in mysql.py should be 'longtext' too.
comment:3 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Note:
See TracTickets
for help on using tickets.
patch in the file