#33507: Use native UUID data type on MariaDB 10.7+
-------------------------------------+-------------------------------------
     Reporter:  Mariusz Felisiak     |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  4.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  mariadb              |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

 Replying to [comment:3 Simon Charette]:
 > Small note that we should make sure that changing this flag won't break
 installs with `UUIDField` backend by `char(32)` columns as it might be
 impractical for large installs to rebuild their whole table primary keys
 otherwise.
 >
 > If we don't document a clear upgrade path I foresee a few reports when
 users attempt to add a `ForeignKey` referencing a model with a `UUIDField`
 primary key that is backed by a `char(32)` and hit a MariaDB error telling
 them that a foreign constraint cannot be created from a `uuid` to a
 `char(32)` column.

 According to the [https://mariadb.org/10-7-preview-feature-uuid-data-type/
 blog post], it should be possible to change a data type without manual
 data conversion:

 > ''With these basic conversion rules, you can migrate from your existing
 CHAR/VARCHAR/TEXT hexadecimal text or BINARY/VARBINARY/BLOB encoded to
 UUID using:''
 > {{{
 > CREATE TABLE t1 (id BINARY(16));
 > ALTER TABLE t1 MODIFY COLUMN id UUID;
 > }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33507#comment:4>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.3ae5d3c62f35967f70918484b8f6e460%40djangoproject.com.

Reply via email to