mirror of
https://github.com/django/django.git
synced 2025-11-25 13:13:28 +00:00
Fixed #28597 -- Fixed crash with the name of a model's autogenerated primary key in an Index's fields.
This commit is contained in:
parent
94cd8efc50
commit
fb02ebe889
4 changed files with 15 additions and 8 deletions
|
|
@ -9,7 +9,10 @@ class Book(models.Model):
|
|||
isbn = models.CharField(max_length=50, db_tablespace='idx_tbls')
|
||||
|
||||
class Meta:
|
||||
indexes = [models.indexes.Index(fields=['title'])]
|
||||
indexes = [
|
||||
models.indexes.Index(fields=['title']),
|
||||
models.indexes.Index(fields=['isbn', 'id']),
|
||||
]
|
||||
|
||||
|
||||
class AbstractModel(models.Model):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue