Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
This article describes new features, improvements, and changes in each version of the mssql-django Django database backend.
Version 1.7.3
Release date: June 2026
Version 1.7.3 is a backward-compatible patch release with two connection and runtime fixes.
Bug fixes
FA001forAuthentication=modes other thanActiveDirectoryMsi: Previously, the backend skippedTrusted_Connection=yesonly forActiveDirectoryMsi. Other Entra modes that don't supply aUSERvalue (for example,ActiveDirectoryIntegrated,ActiveDirectoryDefault,ActiveDirectoryDeviceFlow) still receivedTrusted_Connection=yes, which the ODBC driver rejected withFA001(Cannot use Authentication option with Integrated Security option). The fix detects any explicitAuthentication=value with a boundary-aware, case-insensitive match and skips bothTrusted_ConnectionandIntegrated Security=SSPI. Password handling is unchanged:SqlPassword,ActiveDirectoryPassword, andActiveDirectoryServicePrincipalcontinue to sendPWD, whileActiveDirectoryInteractivecontinues to omit it.KeyErroron subclassedDatabaseWrapper: The cachedsql_server_versionandto_azure_sql_dbproperties relied ontype(self).__dict__introspection ofcached_property, which raisedKeyErrorthe first time aDatabaseWrappersubclass accessed them (a regression introduced in 1.7.1). The fix uses explicit class-level dicts (_known_versions,_known_azures) accessed throughself., so the lookup resolves through the MRO and subclassed wrappers work correctly.
Version 1.7.2
Release date: May 2026
Version 1.7.2 is a backward-compatible patch release with time zone and compatibility fixes.
Bug fixes
.explain()compatibility for Django 4.0 and later: Fixed compiler handling of Django's explain metadata so.explain()no longer fails withAttributeErroron Django 4.0 and later. The backend now follows version-appropriate explain fields and correctly raisesNotSupportedErrorwhen needed.- datetimeoffset time zone handling: Fixed datetimeoffset parsing so time zone offsets are preserved instead of dropped. Returned datetimes are now time zone-aware when expected.
Now()withUSE_TZ=True: Updated SQL generation forNow()to use time zone-aware behavior when time zone support is enabled, preventing timestamp drift on non-UTC SQL Server hosts.
Version 1.7.1
Release date: April 2026
Version 1.7.1 is a backward-compatible patch release with bug fixes.
Bug fixes
FieldDoesNotExistwhen altering fields with descending index ordering: Fixed_alter_field()inschema.pyto useindex.fields_ordersinstead ofindex.fieldswhen resolving index field names. The previous code passed raw field-with-ordering strings (for example,"-pub_date") tomodel._meta.get_field(), which raisedFieldDoesNotExist. Now only the field name is extracted, and the ordering suffix is properly discarded.- SQL database in Microsoft Fabric support (EngineEdition 12): Recognized SQL database in Fabric (
EngineEdition=12) as an Azure edition. Previously, Fabric's engine edition was unrecognized, causingto_azure_sql_dbto returnFalseand feature-gate checks to fail. The fix addsEDITION_AZURE_SQL_FABRIC=12to_AZURE_EDITIONSand maps Fabric to the latest supported SQL Server version.JSONField, hash functions, collation introspection, and test database teardown now work correctly on Fabric.
Version 1.7
Release date: March 2026
Highlights
- Django 6.0 support: Full compatibility with Django 6.0, which requires Python 3.12 or later. All 6.0 API changes are handled transparently by the backend.
- Partial
CompositePrimaryKeysupport: The backend adds partial support for Django 5.2CompositePrimaryKey. Tuple comparison against subqueries requires Django 5.2.4 or later, and some composite-key andJSONFieldedge cases remain. Django 5.2 itself was first supported in mssql-django 1.6. - SQL Server 2025 support: Validated against SQL Server 2025.
- ODBC Driver 18 default: The backend now defaults to ODBC Driver 18 for SQL Server, with automatic fallback to ODBC Driver 17 if version 18 isn't installed.
Version-specific notes
| Django version | Notes |
|---|---|
| Django 5.1 | inspectdb can inspect tables with composite primary keys, but it doesn't generate complete model definitions for them. |
| Django 5.2 | CompositePrimaryKey support is partial. Tuple comparison against subqueries requires Django 5.2.4 or later, and some migration plus JSONField edge cases remain. |
| Django 6.0 | Requires Python 3.12 or later. All 5.2 limitations apply. |
Version 1.6
Release date: August 2025
- Added Django 5.1 and 5.2 support.
- Enhanced JSON functionality and backward compatibility.
- Improved pipeline infrastructure.
Version 1.5
Release date: April 2024
- Added
supports_commentsfeature flag fordb_comments. - Bug fixes for
AutoField, parameter formatting, and schema queries.
Version 1.4
Release date: January 2024
- Added Django 5.0 support.
- Added
db_commentsupport. - Bug fixes for date/time conversions and empty aggregates.
Version 1.3
Release date: May 2023
- Added Django 4.2 support.
- Added case-sensitive
Replacefunction support. - Bug fixes for
OFFSEThandling and left padding.
Version 1.2
Release date: December 2022
- Added Django 4.1 support.
- Added time zone support (datetimeoffset with
USE_TZ=True). - Added
return_rows_bulk_insertoption for bulk insert ID retrieval. - Added SQL Server 2022 support.
- Added
JSONFieldsupport for Azure SQL Managed Instance.
Version 1.1
Release date: July 2022
- Django 3.2 and 4.0 support.
- SQL Server 2016 and later, and Azure SQL Database support.
pyodbc-based connectivity.