microsoft/mssql-django 1.7
microsoft/mssql-django
Captured source
source ↗published Mar 6, 2026seen 1wcaptured 1whttp 200method plain
1.7
Repository: microsoft/mssql-django
Tag: 1.7
Published: 2026-03-06T12:17:12Z
Prerelease: no
Release notes:
mssql-django 1.7 Release Notes (March 2026)
We're thrilled to announce mssql-django 1.7 ! This release brings first-class Django 6.0 support, Python 3.14 compatibility, SQL Server 2025 readiness, and a wave of quality-of-life improvements across the board.
---
Highlights
- Django 6.0 — Full support for the latest Django, including API renames, JSON path compilation changes, and
DEFAULT_AUTO_FIELDalignment - Python 3.14 — Verified and tested on the newest Python release
- SQL Server 2025 — Tested and supported with CI coverage on Linux
- ODBC Driver 18 — Now the default driver, with automatic v17 fallback
- Composite Primary Keys — Full Django 5.2+ composite PK support with ORDER BY deduplication and ColPairs expansion
- Developer Experience — New devcontainer, Copilot instructions, and AI-assisted development prompts
---
Features
Django 6.0 and Python 3.14 Support (#488, #506, #507, #508, #509, #510)
- What changed: Comprehensive Django 6.0 compatibility across the entire backend — JSON path handling via
connection.ops.compile_json_path(), compatibility shims for renamed API methods (return_insert_columns()→returning_columns(),fetch_returned_insert_rows()→fetch_returned_rows()),CheckConstraintparameter rename (check→condition),DEFAULT_AUTO_FIELDalignment,db_defaultbulk insert support, batching and ORDER BY compatibility, JSON lookup path handling, JSON ordering withKeyTransformdeduplication,StringAggorder_bysupport (includingOuterRef), anddb_defaultinsert returning fallback with trigger-safe temp table reuse. Python 3.14 is fully tested across all configurations. - Who benefits: Teams adopting the latest Django and Python versions, anyone wanting to stay on the cutting edge
- Impact: Seamless upgrade path to Django 6.0 with Python 3.14 support — no application-level changes required
SQL Server 2025 Support (#489)
- What changed: Added SQL Server 2025 to the test matrix with Linux CI coverage. Verified compatibility with stricter identifier parsing in SQL Server 2025.
- Who benefits: Teams evaluating or deploying on SQL Server 2025
- Impact: Confidence that the backend works with the newest SQL Server release
Composite Primary Key Support (#462, #465, #501, #504)
- What changed: Full composite primary key support for Django 5.2+, including ORDER BY deduplication to prevent SQL Server error 169 ("A column has been specified more than once in the order by list"),
ColPairsexpansion inget_order_by()to prevent ORDER BY corruption withJSONArray,bulk_updatevalidation for composite PK fields, and tuple-lookup fallback support for Django 5.2.4+. - Who benefits: Applications using multi-column primary keys, a key Django 5.2 feature
- Impact: Composite primary keys work correctly with ordering, bulk operations, and JSON functions
ODBC Driver 18 as Default (#493)
- What changed: Default ODBC driver upgraded from v17 to v18. Automatic fallback to v17 if v18 is not installed, with a warning log and security recommendations. Connection string building refactored into a dedicated method. Added 45 new unit tests covering
DatabaseWrapperutility functions. - Who benefits: All users — v18 includes important security improvements (encryption enabled by default)
- Impact: Better security out of the box; existing v17 installations continue to work seamlessly via auto-fallback
Devcontainer for Local Development (#500)
- What changed: Added a full Docker Compose–based devcontainer with SQL Server 2022 and Python 3.14, both ODBC drivers (17 & 18), shell aliases (
test,testall,migrate,shell,dbshell,sqlcmd), environment-variable-driven test settings, and automatic Django source cloning for the full test suite. - Who benefits: New contributors and developers who want a zero-setup development environment
- Impact: Clone → open in VS Code → start coding. No manual SQL Server or ODBC driver setup needed
Copilot Instructions & AI-Assisted Development (#495)
- What changed: Added comprehensive GitHub Copilot instructions covering repository structure, SQL Server limitations, coding patterns (
as_microsoft), testing procedures, and version compatibility. Added reusable prompt files for dev environment setup, running unit tests, and running the Django test suite. - Who benefits: Contributors using GitHub Copilot or AI-assisted coding tools
- Impact: AI assistants have full project context, leading to higher-quality suggestions and faster contributions
---
Improvements
Enhanced quote_name() Identifier Handling (#490)
- What changed: Refactored
quote_name()to treat names as single identifiers without splitting on periods. Added dedicatedquote_table_name()for explicitschema.tablehandling. Fixes issues with annotation aliases containing periods (e.g.,ordering_article.pub_date). - Who benefits: Applications using Django 5.2+ annotation features
- Impact: Eliminates invalid SQL from period-containing aliases across all SQL Server versions
Meta.indexes Restoration on Field Alteration (#498)
- What changed: Fixed
_alter_field()to properly restoreMeta.indexesafter altering fields, preventing silent index loss during migrations. - Who benefits: Applications running schema migrations that alter indexed fields
- Impact: Indexes are no longer silently dropped during field alterations
Pipeline and CI Infrastructure (#473, #474, #489)
- What changed: Made ADO pipelines public, fixed pipeline runs on PRs, added SQL Server 2025 Linux CI, environment-variable-driven test configuration replacing
sed/PowerShell scripts. - Who benefits: Contributors and maintainers
- Impact: More reliable, transparent, and reproducible CI builds
---
Bug Fixes
JSON Lookup Path Handling (#506)
- What changed: Fixed JSON path compilation to prevent double-escaping of special characters. Clarified the JSON path contract between
compile_json_path()andcompile_json_path_final_key(). - Who benefits: Applications using
JSONFieldlookups - Impact: Correct JSON queries across all Django versions
Batching and ORDER BY Compatibility (#507)
- What changed: Fixed parameter handling for batching changes,...
Excerpt shown — open the source for the full document.
Notability
notability 2.0/10Routine DB connector release, no AI relevance.