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:
committed by
Tim Graham
parent
211d2bf3f2
commit
6afede8219
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user