Remove methods that create secondary indexes

All indexes are created in the _create_schema method.
This commit is contained in:
Nick Hall 2016-12-08 21:49:47 +00:00
parent 83e5bd6be3
commit d8796d35fb

View File

@ -965,28 +965,6 @@ class DBAPI(DbGeneric):
LOG.info("Table %s is being committed, " LOG.info("Table %s is being committed, "
"rebuilt, and indexed...", table) "rebuilt, and indexed...", table)
self.update_secondary_values_table(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): def update_secondary_values_all(self):
""" """