Markus Holtermann

Markus Holtermann

Markus is a Django core developer since early 2015 with a particular focus on the migrations framework. He discovered Python and Django in 2010 with ubuntuusers.de. Over the last months Markus traveled through Australia after graduating as a Master of Science in Computer Science at TU Berlin and worked at Common Code in Melbourne.

@m_holtermann

Don't be afraid of writing migrations

With Django 1.7 the built-in migrations framework was introduced. With the release of version 1.9, the migrations framework is much more robust, faster and can handle many more edge cases.

While the makemigrations management command became smarter in the last two releases in terms of detecting what has changed and what migrations to generate, there are still a couple of things Django cannot do automatically.

I will point out some of the common cases where you should get your hands dirty, and show you how writing migrations is easier than you think. Migrations are just Python code, and are as much a part of your apps as your models, forms, and views. After all, they were always meant to be human-writable.