How to Create an Index in Django Without Downtime

All you need to know to implement graceful migrations in Django

If you maintain a Django site with a decent traffic, you probably need to deal with graceful migrations. With the help of the Real Python team, I wrote an article about one the most common problems in Django migrations: How to create an index without causing downtime.

In the article I explain what atomic and reversible migrations are, how to execute “raw” SQL in migrations the right way, and how using a little known migration command called SeparateDatabaseAndState, you can completely alter the Django migrations built-in behavior.

Read “How to Create an Index in Django Without Downtime” on RealPython ≫

Image for post
Image for post
How to Create an Index in Django Without Downtime

Full Stack Developer, Team Leader, Independent. More from me at https://hakibenita.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store