From d8796d35fbeadfa47f1a1a9edf8921a6e700f379 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Thu, 8 Dec 2016 21:49:47 +0000 Subject: [PATCH] Remove methods that create secondary indexes All indexes are created in the _create_schema method. --- gramps/plugins/db/dbapi/dbapi.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/gramps/plugins/db/dbapi/dbapi.py b/gramps/plugins/db/dbapi/dbapi.py index 97a5e2e9c..8d3edb3f2 100644 --- a/gramps/plugins/db/dbapi/dbapi.py +++ b/gramps/plugins/db/dbapi/dbapi.py @@ -965,28 +965,6 @@ class DBAPI(DbGeneric): LOG.info("Table %s is being committed, " "rebuilt, and indexed...", table) self.update_secondary_values_table(table) - self.create_secondary_indexes_table(table) - - def create_secondary_indexes(self): - """ - Create the indexes for the secondary fields. - """ - for table in self.get_table_func(): - if not hasattr(self.get_table_func(table, "class_func"), - "get_index_fields"): - continue - self.create_secondary_indexes_table(table) - - def create_secondary_indexes_table(self, table): - """ - Create secondary indexes for just this table. - """ - table_name = table.lower() - for field in self.get_table_func( - table, "class_func").get_index_fields(): - field = self._hash_name(table, field) - self.dbapi.execute("CREATE INDEX %s_%s ON %s(%s)" - % (table, field, table_name, field)) def update_secondary_values_all(self): """