Commit 774b154e authored by jeremystretch's avatar jeremystretch
Browse files

Reference constant in index declaration

parent 2d49fc25
......@@ -53,13 +53,13 @@ class CachedValue(models.Model):
Index(
fields=['value'],
name='extras_cachedvalue_value',
condition=Q(LessThan(Length('value'), 1024))
condition=Q(LessThan(Length('value'), INDEX_MAX))
),
Index(
fields=['value'],
name='extras_cachedvalue_value_like',
opclasses=['text_pattern_ops'],
condition=Q(LessThan(Length('value'), 1024))
condition=Q(LessThan(Length('value'), INDEX_MAX))
),
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment