Fixed #28052 -- Prevented dropping Meta.indexes when changing db_index to False.

Thanks Marc Tamlyn for the report and Ian Foote/Tim Graham for review.
This commit is contained in:
Markus Holtermann 2017-04-07 15:54:40 +02:00 committed by Tim Graham
parent 63afe3a2bf
commit 663e48947f
4 changed files with 68 additions and 6 deletions

View file

@ -33,6 +33,13 @@ class AuthorWithEvenLongerName(models.Model):
apps = new_apps
class AuthorWithIndexedName(models.Model):
name = models.CharField(max_length=255, db_index=True)
class Meta:
apps = new_apps
class Book(models.Model):
author = models.ForeignKey(Author, models.CASCADE)
title = models.CharField(max_length=100, db_index=True)