I would recommend a `max_length=2000`. URL's with a length over 2000 are
[http://stackoverflow.com/questions/417142/what-is-the-maximum-length-
of-a-url not as well supported]. However since
[https://docs.djangoproject.com/en/dev/ref/databases/#character-fields
database enforcement of CharFields in MySQL is limited to 255 characters],
the fields have to be also changed to `TextField`s.
--
Ticket URL: <https://code.djangoproject.com/ticket/19515>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_better_patch: => 1
* needs_tests: => 0
* keywords: redirects =>
* owner: nobody => anonymous
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:1>
* owner: anonymous => saulshanabrook
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:2>
* version: 1.4 => master
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:3>
* has_patch: 0 => 1
Comment:
Created fix at https://github.com/saulshanabrook/django/tree/ticket_19515
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:4>
* easy: 1 => 0
* stage: Unreviewed => Someday/Maybe
Comment:
Thanks for the suggestion. The problem here isn't to change the max_size —
it's to provide a suitable upgrade path for existing users. Otherwise,
application-level and database-level constraints won't match any longer,
which will result in uncaught errors.
In general we've postponed this kind of requests to after Django gets
built-in migrations — most likely 1.6 or 1.7.
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:5>
Comment (by s.shanabrook@…):
Even though we don't need the form provided by a `CharField`, MySQL limits
unique `Charfield`s to 255 characters:
https://docs.djangoproject.com/en/dev/ref/databases/#character-fields
"Any fields that are stored with VARCHAR column types have their
max_length restricted to 255 characters if you are using unique=True for
the field. This affects CharField, SlugField and
CommaSeparatedIntegerField."
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:6>
* stage: Someday/Maybe => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:7>
* cc: gavinwahl+gh@… (added)
Comment:
Django now has built-in migrations. Is this feasible now?
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:8>
Comment (by timgraham):
I'd think so (hence why I moved the ticket to accepted).
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:9>
Comment (by Claude Paroz):
This will be far easier once #28661 is fixed.
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:10>
* owner: Saul Shanabrook => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:11>
* owner: (none) => Michael Howitz
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:12>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:13>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/19515#comment:14>