mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
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:
parent
63afe3a2bf
commit
663e48947f
4 changed files with 68 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue