# How to Create an Index in Django Without Downtime

DevFeed: [How to Create an Index in Django Without Downtime](<https://devfeed.tech/articles/how-to-create-an-index-in-django-without-downtime-33908.md>)

Original publisher: [Read original article](<https://hakibenita.com/how-to-create-django-index-without-downtime>)

Author: Haki Benita

Published: 2019-04-09T21:00:00Z

Content type: tutorial

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [Django](<https://devfeed.tech/topics/django.md>), [migration](<https://devfeed.tech/topics/migration.md>), [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [django](<https://devfeed.tech/tags/django.md>), [downtime](<https://devfeed.tech/tags/downtime.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [migration](<https://devfeed.tech/tags/migration.md>), [migrations](<https://devfeed.tech/tags/migrations.md>), [orm](<https://devfeed.tech/tags/orm.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

A tutorial on creating a Django database index without downtime. It explains graceful migrations, atomic and reversible migrations, executing raw SQL in migrations, and changing Django's built-in migration behavior.

## Source excerpt

If you ever had to maintain a traffic heavy Django site, you probably had to deal with graceful migrations. 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 we can completely alter the Django migrations built-in behavior.