mirror of
https://github.com/django/django.git
synced 2025-10-28 16:16:12 +00:00
[1.5.x] Fixed #19441 -- Created PostgreSQL varchar index when unique=True
Thanks Dylan Verheul for the report and Anssi Kääriäinen for the
review.
Backport of 55972ee5c from master.
This commit is contained in:
@@ -9,3 +9,9 @@ class Article(models.Model):
|
||||
index_together = [
|
||||
["headline", "pub_date"],
|
||||
]
|
||||
|
||||
|
||||
class IndexedArticle(models.Model):
|
||||
headline = models.CharField(max_length=100, db_index=True)
|
||||
body = models.TextField(db_index=True)
|
||||
slug = models.CharField(max_length=40, unique=True, db_index=True)
|
||||
|
||||
Reference in New Issue
Block a user