only add index flag if DB_GIN_TRGM is set
This commit is contained in:
parent
56f9e3f3d1
commit
577afd682e
3 changed files with 3 additions and 2 deletions
|
|
@ -133,7 +133,7 @@ attrs = {
|
|||
|
||||
'sortvalue': models.CharField(max_length=1000, null=True, db_index=True),
|
||||
#run this CREATE INDEX clip_clip_findvalue_idx ON clip_clip USING gin (findvalue gin_trgm_ops);
|
||||
'findvalue': models.TextField(null=True, db_index=True),
|
||||
'findvalue': models.TextField(null=True, db_index=settings.DB_GIN_TRGM),
|
||||
}
|
||||
for name in settings.CONFIG['clipLayers']:
|
||||
attrs[name] = models.BooleanField(default=False, db_index=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue