title: Adding indexes to model fields in Django with migrations
body: <p>I am trying to add indexes on model fields using <code>Field.db_index</code> for an app that has migrations. Looking at <a href="https://docs.djangoproject.com/en/1.7/ref/models/fields/#django.db.models.Field.db_index" rel="noreferrer">Django's documentation</a> all I need to do is to set <code>db_index=True</code>:</p>
  
  <pre><code>class Person(models.Model):
      first_name = models.CharField()
      last_name = models.CharField(db_index=True)
  </code></pre>
  
  <p>and then I first tried the new Django's Migration:</p>
  
  <pre><code>./manage.py makemigrations app-name
  </code></pre>
  
  <p>but Migration does not seem to notice the change and does not add the sql command for creating an index. So I tried <code>django-admin.py</code> as explained <a href="https://docs.djangoproject.com/en/1.7/ref/django-admin/#django-admin-sqlindexes" rel="noreferrer">here</a>:</p>
  
  <pre><code>django-admin.py sqlindexes app-name
  </code></pre>
  
  <p>But that does not print the sql command either and it exits with the following error:</p>
  
  <pre><code>CommandError: App 'app-name' has migrations. Only the sqlmigrate and sqlflush commands can be used when an app has migrations.
  </code></pre>