Django Diaries / 23rd Aug 2013

A Plan Comes Together

I'm very pleased to report that, just before this blog post was published, we merged my schema-alteration branch into Django.

It's been a long road, and I'd like to thank everyone who's helped me, especially those who backed my Kickstarter and my fellow core developers, all of whom have been invaluable.

This isn't the end of my work, though; it's just the end of the first phase. Migrations are functional but not complete, and the schema backends are passing all of their tests but will still have a few bugs.

What next?

The next step is twofold; working on improving the documentation (there's still large gaps in the reference documentation), while also adding some missing features, including:

  • Migration squashing. The underlying framework for this in place but the user-facing commands aren't written yet.
  • More Operations, including ones for custom raw SQL and custom Python code (for more complex manipulations)
  • Better merge detection: Currently it just errors, while instead it should be able to resolve some merges automatically.
  • Support for out-of-transaction operations, like CREATE INDEX CONCURRENTLY on PostgreSQL. This will require a little bit of special handling, as the rest of the migrations on PostgreSQL happen inside a transaction.

There's also a lot of general polish that needs doing so everything works smoothly on real-life projects. I'll be transferring one of my new projects over onto these new migrations today, though, so I can start using them in a real environment and get a feel for what needs fixing.

If you want to check out Django's master branch and play around with what's slowly becoming 1.7, then be my guest; I'd love to hear your feedback on any bugs, design issues, or things you just think are great.

In the meantime, I'm off to have lunch and fix the inevitable set of bugs that our continuous integration raises. After all, with fifteen different combinations of Python version and database backend to test on, something's bound to fail.