1.7.1
mssql-django 1.7.1 Release Notes (April 2026)
mssql-django 1.7.1 is a patch release that fixes bugs discovered after 1.7 and adds test coverage for previously untested scenarios.
Bug Fixes
Fix FieldDoesNotExist when AlterField with Descending Index Fields (#405, #519, #521)
- What changed: Fixed
_alter_field()inschema.pyto useindex.fields_ordersinstead ofindex.fieldswhen resolving index field names. The previous code passed raw field-with-ordering strings (e.g.,"-pub_date") tomodel._meta.get_field(), which raisedFieldDoesNotExist. Now only the field name is extracted, and the ordering suffix is properly discarded. A regression test was added to prevent recurrence. - Who benefits: Applications using
Meta.indexeswith descending field ordering (e.g.,Index(fields=['-pub_date'])) that run schema migrations altering those fields - Impact: Schema migrations no longer crash when altering fields that participate in indexes with explicit ordering
Microsoft Fabric SQL Database Support (EngineEdition 12) (#518)
- What changed: Recognized Fabric SQL Database (
EngineEdition=12) as an Azure edition. Previously, Fabric's engine edition was unrecognized, causingto_azure_sql_dbto returnFalseand itsProductVersion(12.x) to collide with SQL Server 2014's version map. These two wrong values cascaded into feature-gate checks failing — JSONField reported as unsupported, hash functions raisingNotSupportedError, collation introspection skipped, and test database teardown running unsupportedSET SINGLE_USER. The fix addsEDITION_AZURE_SQL_FABRIC=12to_AZURE_EDITIONSand maps Fabric to the latest supported SQL Server version instead of using the misleadingProductVersion. Azure SQL DB and Managed Instance behavior is unchanged. Server properties are now fetched in a single query, eliminating an extra round trip for on-prem connections. - Who benefits: Teams running Django on Microsoft Fabric SQL Database
- Impact: All version/edition-gated features (JSONField, hash functions, collation introspection, test setup) now work correctly on Fabric
Infrastructure & Test Coverage
Upgrade Windows CI to SQL Server 2025 (#513)
- What changed: Updated the Windows CI pipeline image from the previous SQL Server version to SQL Server 2025 (
JDBC-MMS2025-SQL2025). - Who benefits: Contributors and maintainers
- Impact: CI now tests against the latest SQL Server on both Linux and Windows
DateTime Field Subtraction Tests (#368, #472)
- What changed: Added 8 unit tests for
subtract_temporals()inoperations.py, covering both-tuples, both-lists, mixed list+tuple, empty params,DateField, andDateTimeFieldpaths. No code fix — the existingtuple()normalization already handled this correctly. - Who benefits: Contributors and maintainers
- Impact: Regression safety for DateTime subtraction edge cases
Version Compatibility
| Component | Supported Versions |
|---|---|
| Django | 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0 |
| Python | 3.8 – 3.14 |
| 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. This is a fully backward-compatible patch release.
Contributors
Thank you to everyone who contributed to this release!
Community Contributors:
- @tuxskar (Oscar Ramirez) — Fixed
FieldDoesNotExistwhenAlterFieldwith descending index fields (#519) - @PawelKawula (Paweł Kawula) — Added tests for DateTime field subtraction (#472)