#6663: UUID as Primary Key (Re. 4682)
-------------------------------------+-------------------------------------
     Reporter:  Jonathan Harker      |                    Owner:  nobody
  <jon@…>                            |                   Status:  new
         Type:  Uncategorized        |                  Version:  1.5
    Component:  Database layer       |               Resolution:
  (models, ORM)                      |             Triage Stage:  Design
     Severity:  Normal               |  decision needed
     Keywords:  primary key, uuid    |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by audrius.butkevicius@…):

 * status:  closed => new
 * version:  1.4 => 1.5
 * resolution:  invalid =>


Comment:

 I believe with Django 1.5 and introduction of custom user models this
 becomes a more frequent requirement. Even by using standard User or
 AbstractUser models, users have to possibility to define a custom primary
 key by modifying the meta class.

 Though the documentation specifies that the primary key is supposed to be
 an integer, the only piece of code (that I can find) enforcing an integer
 is the password recovery form, which could be modified to accept any form
 of primary keys.

 The benefit of having UUID primary key would mean that you could merge
 users from multiple instances of the same application without any hassle,
 or even better, have multiple instances of the same application
 synchronizing users between them without the fear of PK collision.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/6663#comment:7>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to