print local name and ip in vm terminal, document trigram index

This commit is contained in:
j 2012-03-30 16:57:07 +02:00
commit 0042546d6c
5 changed files with 90 additions and 10 deletions

View file

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from django.core.management.base import BaseCommand
from django.conf import settings
import monkey_patch.models
from ... import models
class Command(BaseCommand):
"""
print sql statement to add trigram
"""
help = 'sql create statements for find tables to use trigram index'
args = ''
def handle(self, **options):
print 'CREATE INDEX item_itemfind_value_idx ON item_itemfind USING gin (value gin_trgm_ops);'
print ''
print 'CREATE INDEX clip_clip_findvalue_idx ON clip_clip USING gin (findvalue gin_trgm_ops);'