diff --git a/pandora/item/management/commands/sqlfindindex.py b/pandora/item/management/commands/sqlfindindex.py index c6d99af3..88ca8144 100644 --- a/pandora/item/management/commands/sqlfindindex.py +++ b/pandora/item/management/commands/sqlfindindex.py @@ -42,8 +42,3 @@ class Command(BaseCommand): name = 'findvalue' if name not in indexes: create_table("%s_%s_idx"%(table_name, name), table_name, name) - for name in settings.CONFIG['clipLayers']: - name = '%s_findvalue' % name - if name not in indexes: - create_table("%s_%s_idx"%(table_name, name), table_name, name) - diff --git a/pandora/item/management/commands/sync_itemsort.py b/pandora/item/management/commands/sync_itemsort.py index 03080210..dd4ac590 100644 --- a/pandora/item/management/commands/sync_itemsort.py +++ b/pandora/item/management/commands/sync_itemsort.py @@ -76,10 +76,6 @@ class Command(BaseCommand): if name not in model_fields: sql = 'ALTER TABLE "%s" DROP COLUMN "%s"' % (table_name, name) changes.append(sql) - if settings.DB_GIN_TRGM: - gin_indexes = ['%s_findvalue' % n for n in settings.CONFIG['clipLayers']] - else: - gin_indexes = [] for f in clip.models.Clip._meta.fields: if not f.primary_key and not isinstance(f, fields.related.ForeignKey): name = f.name @@ -87,13 +83,8 @@ class Command(BaseCommand): if name not in db_fields: sql = 'ALTER TABLE "%s" ADD COLUMN "%s" %s' % (table_name, name, col_type) changes.append(sql) - if name in gin_indexes: - sql = 'CREATE INDEX "%s_%s_idx" ON "%s" USING gin ("%s" gin_trgm_ops);' % ( - table_name, name, table_name, name - ) - else: - sql = 'CREATE INDEX "%s_%s_idx" ON "%s" ("%s")' % (table_name, name, - table_name, name) + sql = 'CREATE INDEX "%s_%s_idx" ON "%s" ("%s")' % (table_name, name, + table_name, name) changes.append(sql) sql = 'ALTER TABLE "%s" ALTER COLUMN "%s" SET NOT NULL' % (table_name, name) changes.append(sql)