Blog Post

SQL Server Blog
2 MIN READ

mssql-django 1.8.0: Django 6.1 Support within 48 Hours of Django 6.1 GA

DavidLevy's avatar
DavidLevy
Icon for Microsoft rankMicrosoft
Aug 07, 2026

Django 6.1 GA'd on August 5. mssql-django 1.8.0 was on PyPI within 48 hours.

This is the first time the backend has shipped support for a new Django release in lockstep with Django itself. If you run SQL Server, Azure SQL, or SQL database in Microsoft Fabric, you can move to 6.1 today without code changes.

pip install --upgrade mssql-django Django

How it shipped this fast

The work started in June, against the 6.1 beta.

  • The beta went into the full CI matrix weeks before GA, we knew about every backend API break in June.
  • Fixes were developed on an integration branch and validated on live CI against real 6.1 builds on SQL Server 2025.
  • By GA day, the release was tested and ready to publish.

What's new

Django 6.1 changed several parts of the database backend API. Every change here is version-gated, so earlier Django versions are unaffected.

  • Query compilation for 6.1's sliced and offset queries. Django 6.1 deprecated SQLCompiler.quote_name_unless_alias() in favor of SQLCompiler.quote_name(); sliced querysets and OFFSET ... FETCH now compile without Django 7.0 deprecation warnings.
  • Database introspection. get_relations() returns 6.1's expanded shape, including the database-level ON DELETE rule, so inspectdb keeps working.
  • Upfront errors for the 6.1 features SQL Server cannot support.
  • Regression tests, CI, and packaging for 6.1 on Windows and Linux with Python 3.12, 3.13, and 3.14.

What doesn't work on 6.1

Two 6.1 features are unavailable:

Database-level referential actions (DB_CASCADE, DB_SET_NULL, DB_SET_DEFAULT). SQL Server disallows multiple cascade paths to the same table, and that is still true in SQL Server 2025. Using one fails Django's system checks with fields.E324; use Django's on_delete handling instead.

Bitwise aggregates (BitAnd, BitOr, BitXor). SQL Server has no native bitwise aggregate function, and the backend doesn't emulate one yet, so these raise NotSupportedError. If this is important to you, drop a comment on issue #572 with your use case.

Supported versions

ComponentSupported versions
Django3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1
Python3.8 through 3.14; Django 6.0 and 6.1 require Python 3.12+
SQL ServerAll supported versions
Azure SQLAzure SQL Database and Azure SQL Managed Instance
Microsoft FabricSQL database in Microsoft Fabric

This matrix is wider than it should be. Django 5.1 and earlier and Python 3.9 and earlier are already past end of life upstream. A separate upcoming release will narrow this list to the versions their own projects still support.

Upgrading

pip install --upgrade mssql-django Django

 

1.8.0 release notes: https://github.com/microsoft/mssql-django/releases/tag/1.8.0 

README: https://github.com/microsoft/mssql-django#supportability 

Django 6.1 release notes: https://docs.djangoproject.com/en/6.1/releases/6.1/ 

PyPI: https://pypi.org/project/mssql-django/ 

Issues: https://github.com/microsoft/mssql-django/issues

Published Aug 07, 2026
Version 1.0
No CommentsBe the first to comment