Skip to content

1.7.1

Choose a tag to compare

@bewithgaurav bewithgaurav released this 24 Apr 09:24

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() in schema.py to use index.fields_orders instead of index.fields when resolving index field names. The previous code passed raw field-with-ordering strings (e.g., "-pub_date") to model._meta.get_field(), which raised FieldDoesNotExist. 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.indexes with 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, causing to_azure_sql_db to return False and its ProductVersion (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 raising NotSupportedError, collation introspection skipped, and test database teardown running unsupported SET SINGLE_USER. The fix adds EDITION_AZURE_SQL_FABRIC=12 to _AZURE_EDITIONS and maps Fabric to the latest supported SQL Server version instead of using the misleading ProductVersion. 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() in operations.py, covering both-tuples, both-lists, mixed list+tuple, empty params, DateField, and DateTimeField paths. No code fix — the existing tuple() 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 FieldDoesNotExist when AlterField with descending index fields (#519)
  • @PawelKawula (Paweł Kawula) — Added tests for DateTime field subtraction (#472)

Full Changelog

PRs included: #472, #513, #518, #519, #521