#35759: Don't require max_length on CharField on SQLite backend
-------------------------------------+-------------------------------------
     Reporter:  Curtis Maloney       |                    Owner:  (none)
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  5.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * stage:  Unreviewed => Accepted

Comment:

 SQLite doesn't enforce any database constraints when a max length is
 specified (see #21471 and [https://forum.djangoproject.com/t/idea-make-
 sqlite-enforce-varchar-lengths-via-check-constraints/33101 this recent
 forum discussion on the subject]) so supporting `max_length=None` on
 SQLite is trivial (we already implicitly do).

 For anyone interested in picking this up the patch needs three things

 1. The SQLite backend's `supports_unlimited_charfield` feature flag must
 be set to true.
 2. The `CharField`documentation must be adjusted to mention
 
[https://github.com/django/django/blob/16af0c60ed90813ed70ecef4e64a89301ed0f0a2/docs/ref/models/fields.txt#L723
 the feature is available of SQLite as well] with a `::versionchanged`.
 3. A release note must be added.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35759#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070191e980d029-86ed3ad1-efeb-4c0a-ab88-bd6fda5c3755-000000%40eu-central-1.amazonses.com.

Reply via email to