san4ezy / django_softdelete

MIT License
79 stars 21 forks source link

Incompatibility of UUIDFields created in Django 4 with MariaDB #45

Open shamoon opened 3 weeks ago

shamoon commented 3 weeks ago

Hey there, thanks for the project. Got a bunch of reports of users getting this error:

django.db.utils.DataError: (1406, "Data too long for column 'transaction_id' at row 1")

and I believe it can be tracked down to https://docs.djangoproject.com/en/5.1/releases/5.0/#migrating-existing-uuidfield-on-mariadb-10-7 . Basically fields that are created under Django 4 won't work with Django 5. Here's almost the same issue in another project (nothing to do with softdelete): https://github.com/wagtail/wagtail/issues/11776

The fix that Django recommends does feel a bit hack-y, but works (albeit with a small modification). Im not sure if you think this should be included here but we're trying to decide how best to proceed.

Thanks again