X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/2591b1770a0d108069a8b1ffee485ae02f796263..143150bddf1a02498da0dcbdf0ad59d540c1519a:/forum_modules/pgfulltext/startup.py?ds=sidebyside diff --git a/forum_modules/pgfulltext/startup.py b/forum_modules/pgfulltext/startup.py index 0eb3f39..59990b5 100644 --- a/forum_modules/pgfulltext/startup.py +++ b/forum_modules/pgfulltext/startup.py @@ -1,27 +1,27 @@ -import os -from forum.models import KeyValue -from django.db import connection, transaction -import settings - -VERSION = 6 - -if int(settings.PG_FTSTRIGGERS_VERSION) < VERSION: - f = open(os.path.join(os.path.dirname(__file__), 'pg_fts_install.sql'), 'r') - - try: - cursor = connection.cursor() - cursor.execute(f.read()) - transaction.commit_unless_managed() - - settings.PG_FTSTRIGGERS_VERSION.set_value(VERSION) - - except Exception, e: - #import sys, traceback - #traceback.print_exc(file=sys.stdout) - pass - finally: - cursor.close() - - f.close() - -import handlers +import os +from forum.models import KeyValue +from django.db import connection, transaction +import settings + +VERSION = 11 + +if int(settings.PG_FTSTRIGGERS_VERSION) < VERSION: + f = open(os.path.join(os.path.dirname(__file__), 'pg_fts_install.sql'), 'r') + + try: + cursor = connection.cursor() + cursor.execute(f.read()) + transaction.commit_unless_managed() + + settings.PG_FTSTRIGGERS_VERSION.set_value(VERSION) + + except Exception, e: + #import sys, traceback + #traceback.print_exc(file=sys.stdout) + pass + finally: + cursor.close() + + f.close() + +import handlers