#32577: Add support for `UUIDAutoField` `DEFAULT_AUTO_FIELD`
-------------------------------------+-------------------------------------
     Reporter:  Tomasz Wójcik        |                    Owner:  (none)
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  3.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Tomasz Wójcik):

 After 3 years I've decided to give it a try. It's very WIP, but I'd
 appreciate if someone was able to advise if this approach is feasible.

 My reasoning:
 - I still haven't found if all those `if isinstance(obj, AutoField)` can
 be migrated to `AutoFieldMixin` check, my tests seem to pass
 - if it has to be generated in the DB, then PostgreSQL is the only DB (I
 think), that supports generating UUIDs, without any DB extensions
 - if that's correct, then I'm not convinced if this implementation of the
 Postgres-only UUIDv4-db-generated-pk field should be part of Django or
 rather an external library. As a dev I wouldn't mind, but it might be
 confusing for others that are not using PostgreSQL and are looking for a
 similar solution

 [https://github.com/django/django/pull/18365 PR]

 Please advise.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/32577#comment:29>
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/01070190ae3cf74a-b59e8055-1333-4c97-bfe9-2a2f97dc0f22-000000%40eu-central-1.amazonses.com.

Reply via email to