RepoJournal
Django

@django

Python's batteries-included web framework

Pick a date

The Wire · Showcase

DJANGO FIXES MIGRATION CRASH THAT BREAKS UNIQUE CONSTRAINTS

By RepoJournal · Filed · About Django

A critical bug in Django's migration system is now patched: CreateModel with unique_together no longer crashes when followed by AlterUniqueTogether in the same migration.

The fix [1] resolves a crash that occurred when migrations contained both operations in sequence. Django was attempting to remove a unique constraint that existed only in deferred SQL, causing the alter operation to fail. This is the kind of silent killer that ships to production undetected until you run a specific migration sequence. In parallel, the docs got a significant boost with new guidance on test performance [2]. The team added explicit documentation showing how setUpTestData dramatically speeds up test suites by reusing data across tests, with revised examples that actually demonstrate the isolation mechanics. Secondary fixes landed on password hashing anchor links [3] and the steering council published June meeting notes [4]. ASV benchmarks also updated with ubuntu-latest results [5], keeping the performance baseline current.

Action items

References

  1. [1] Fixed #31317 -- Avoided crash in CreateModel with unique_together and AlterUniqueTogether. ↗ django/django
  2. [2] Fixed #37128 -- Doc'd setUpTestData as test speed up. django/django
  3. [3] Fixed password hashing anchor link for references. django/django
  4. [4] Add 2026-06-15 meeting notes django/steering-council
  5. [5] Results for ubuntu-latest added [skip ci] django/django-asv

FAQ

What changed in Django on June 16, 2026?
A critical bug in Django's migration system is now patched: CreateModel with unique_together no longer crashes when followed by AlterUniqueTogether in the same migration.
What should Django teams do about it?
Upgrade Django to patch version containing fix #31317 before your next migration deployment • Review your test suite for setUpTestData opportunities using the updated documentation
Which Django repositories shipped on June 16, 2026?
django/django, django/steering-council, django/django-asv

Related across the cluster

For your repos

The showcase is a teaser.
Your wire is the product.

Same engine. Different stack. Below: what changes when the wire is yours.

Showcase wire

  • 14 famous open source orgs
  • One wire per day
  • Public, generic
  • Read on the web, when you remember

Your wire

  • Up to 1,500 of your repos - orgs, deps, vendors
  • Morning and evening briefs
  • Action items routed to your team
  • Slack delivery, email, breaking-news CVE alerts

Want a hands-on demo first? Ask a current user for an invite link.