#17763: Problem with auth_permission name length
------------------------------+--------------------
     Reporter:  stenius@…     |      Owner:  nobody
         Type:  Bug           |     Status:  new
    Component:  contrib.auth  |    Version:  1.3
     Severity:  Normal        |   Keywords:
 Triage Stage:  Unreviewed    |  Has patch:  0
Easy pickings:  1             |      UI/UX:  0
------------------------------+--------------------
 Django automatically generates a name that is longer than what the default
 field length can hold.


 {{{INSERT INTO "auth_permission" ("name", "content_type_id", "codename")
 VALUES (%s, %s, %s) (u'Can add study plan practice assessment tutorial
 question', 52, u'add_studyplanpracticeassessmenttutorialquestion')}}}

 This will fail with a error about it not being able to fit in a
 varchar(50)
 {{{
                                      Table "public.auth_permission"
      Column      |          Type          |
 Modifiers
 
-----------------+------------------------+--------------------------------------------------------------
  id              | integer                | not null default
 nextval('auth_permission_id_seq'::regclass)
  name            | character varying(50 ) | not null
  content_type_id | integer                | not null
  codename        | character varying(100) | not null
 }}}
 This was under PostgreSQL and after modifying the field to have a length
 of 200, I was able to perform the insert.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17763>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to