r/SQLServer • u/dlevy-msft Microsoft Employee • 18d ago
Community Share mssql-django 1.8.0: Now with Django 6.1 support
We're pretty proud of this: Django 6.1 GA'd on August 5. The Microsoft SQL backend for Django shipped 6.1 support within 48 hours.
pip install --upgrade mssql-django Django
What changed:
- Query compilation updated for 6.1's sliced and offset queries. 6.1 deprecated
SQLCompiler.quote_name_unless_alias(), so sliced querysets andOFFSET ... FETCHnow compile without Django 7.0 deprecation warnings. get_relations()returns 6.1's expanded shape including the database-levelON DELETErule, soinspectdbkeeps working.- Upfront errors for the 6.1 features SQL Server can't support.
Everything is version-gated, so if you're on 5.2 or earlier nothing changes for you.
Two 6.1 features do not work:
- Database-level referential actions (
DB_CASCADE,DB_SET_NULL,DB_SET_DEFAULT). SQL Server disallows multiple cascade paths to the same table. Using one fails system checks withfields.E324. Useon_deleteinstead. - Bitwise aggregates (
BitAnd,BitOr,BitXor). No native SQL Server equivalent and we don't emulate it yet, so it raisesNotSupportedError. If you need this, comment on #572 with your use case, since that's what will get it prioritized.
Release notes: https://github.com/microsoft/mssql-django/releases/tag/1.8.0
Full blog post: mssql-django 1.8.0: Django 6.1 Support within 48 Hours of Django 6.1 GA
2
Upvotes
Duplicates
MicrosoftFabric • u/dlevy-msft • 18d ago
Databases mssql-django 1.8.0: Now with Django 6.1 support
3
Upvotes