ucam-department-of-psychiatry / crate

Create and use de-identified research databases. Preprocess, extract text, anonymise/de-identify, link, apply natural language processing, query for research, manage consent for contact.
GNU General Public License v3.0
19 stars 7 forks source link

Upgrade to Django 4.2 #160

Closed martinburchell closed 1 month ago

martinburchell commented 1 month ago

Django 4.2 requires MySQL 8 so we need Ubuntu 22.04 for some GitHub workflows and Debian 11 for the Docker image (Debian 10 LTS has now reached EOL anyway).

I've gone through all the release notes from 4.0 to present and run https://github.com/adamchainz/django-upgrade/. This tool makes some other optional optimisations which I've ignored for now.

The most significant change is that custom model save() methods now have an additional update_fields keyword argument, which supports updating a subset of a row's columns. This set should be updated to include the names of any additional columns updated within the save method itself.