1
0
mirror of https://github.com/django/django.git synced 2025-10-29 08:36:09 +00:00

[1.11.x] 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.

Backport of 663e48947f from master
This commit is contained in:
Markus Holtermann
2017-04-07 15:54:40 +02:00
committed by Tim Graham
parent 211d2bf3f2
commit 6afede8219
4 changed files with 68 additions and 6 deletions

View File

@@ -34,6 +34,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)