1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #28046 -- Added the db_tablespace parameter to class-based indexes.

Thanks Markus Holtermann and Tim Graham for reviews.
This commit is contained in:
Mariusz Felisiak
2017-06-27 21:15:15 +02:00
committed by GitHub
parent 617505ca89
commit 3297dede7f
7 changed files with 93 additions and 23 deletions

View File

@@ -5,6 +5,8 @@ class Book(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
pages = models.IntegerField(db_column='page_count')
shortcut = models.CharField(max_length=50, db_tablespace='idx_tbls')
isbn = models.CharField(max_length=50, db_tablespace='idx_tbls')
class Meta:
indexes = [models.indexes.Index(fields=['title'])]