mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +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:
committed by
Tim Graham
parent
63afe3a2bf
commit
663e48947f
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user