function getPersistedIndices(schema) {
  var indexNames = [];

  schema.tables().forEach(function(tableSchema) {
    if (tableSchema.persistentIndex()) {
      tableSchema.getIndices().forEach(function(indexSchema) {
        indexNames.push(indexSchema.getNormalizedName());
      });

      // Adding RowID index name to the returned array.
      indexNames.push(tableSchema.getRowIdIndexName());
    }
  });

  return indexNames;
}
Finds the names of all indices that are persisted.
@param {!lf.schema.Database} schema
@return {!Array<string>}