mssql-django 1.8.0 Release Notes (August 2026)
mssql-django 1.8.0 adds support for Django 6.1. The backend now runs cleanly on Django 6.1 while continuing to support Django 3.2 through 6.0. For most projects, upgrading requires no code changes. Two Django 6.1 features are not available on this backend, for two different reasons, described under Limitations below.
Highlights
- Django 6.1 support. Full compatibility across the supported SQL Server and Azure SQL matrix, validated against Django 6.1 on SQL Server 2016 through 2025.
- No project changes needed to move from Django 6.0 to 6.1 on this backend, unless you use one of the two 6.1 features noted under Limitations.
- Loud, honest failures. Where a 6.1 feature is unavailable, it fails with a clear system check or a
NotSupportedError, never with silently wrong data.
What Changed for Django 6.1
FEAT: Query compiler uses quote_name on Django 6.1 (#555, #563)
- What changed: Django 6.1 deprecated
quote_name_unless_alias; the backend now usesSQLCompiler.quote_nameon Django 6.1+, gated by version so earlier Django is untouched. - Who benefits: Anyone running sliced or offset queries (
qs[a:b],OFFSET ... FETCH) on Django 6.1. - Impact: Those queries compile correctly without deprecation warnings. Two call sites were patched.
FEAT: Foreign key introspection returns the ON DELETE rule (#556)
- What changed: Django 6.1 expanded
get_relations()to include the database-level ON DELETE rule; the backend now returns the expected three-part shape and maps SQL Server NO ACTION foreign keys accordingly. - Who benefits: Anyone using
inspectdbor foreign key introspection on Django 6.1. - Impact: Introspection produces correct models and relations instead of failing on the new shape.
FEAT: Declare the two 6.1 capabilities this backend does not support (#553)
- What changed: The backend sets the relevant feature flags to False for two Django 6.1 additions, so Django skips the associated tests and the backend raises clean errors at runtime.
- Who benefits: Everyone on Django 6.1. It turns would-be hard failures into predictable, documented behavior.
- Impact: See Limitations below for the exact features and why each is unavailable.
Limitations on Django 6.1
Two features added in Django 6.1 are unavailable on this backend, for different reasons:
- Database-level referential actions (
DB_CASCADE,DB_SET_NULL,DB_SET_DEFAULT). This is a SQL Server platform constraint: SQL Server disallows multiple cascade paths to the same table, and there is no native path for this on any SQL Server version, including 2025. Using one raises a Django system check (fields.E324) that points you to the standard Django-levelon_delete. - Bitwise aggregates (
BitAnd,BitOr,BitXor). SQL Server has no native bitwise aggregate function, and this backend does not currently emulate them, so they raiseNotSupportedError. This is a backend gap, not a hard platform limit: the aggregates can be emulated per bit position, and doing so is tracked as an enhancement in [#572).
Both fail loudly and are documented in the README. The exact skipped Django tests are listed in testapp/settings.py.
Known issues surfaced by the Django 6.1 test suite
Two pre-existing, narrow bugs were surfaced by new Django 6.1 test data. They are not 6.1 regressions and affect all supported Django versions on SQL Server, but they are now tracked openly:
- Pattern lookups with an
F()expression are not escaped for[ ]wildcards (#573). - JSONField
key__iexact=Nonereturns wrong results (#574).
Version Compatibility
| Component | Supported Versions |
|---|---|
| Django | 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1 |
| Python | 3.8 to 3.14 (Django 6.0 and 6.1 require Python 3.12+) |
| SQL Server | 2016, 2017, 2019, 2022, 2025; Azure SQL DB / Managed Instance / Microsoft Fabric |
| ODBC Driver | 17 or 18 for SQL Server (v18 is the default) |
Breaking Changes
None. Existing projects on Django 3.2 through 6.0 are unaffected. Django 6.1 is additive.
Contributors
All changes in this release were made by the maintainers. No external contributors this release.
Full Changelog
PRs included: #553, #555, #556, #557, #558, #559, #563, #564