def createIndexes(tables, ifNotExists=True):
 errors = []
 for table in tables:
  _dbschema_logger.info('creating indexes for table %s', table._imdbpyName)
  try:
   table.addIndexes(ifNotExists)
  except Exception as e:
   errors.append(e)
   continue
 return errors

def createIndexes ( tables , ifNotExists = True ) : errors = [ ] for table in tables : _dbschema_logger . info ( 'creating indexes for table %s' , table . _imdbpyName ) try : table . addIndexes ( ifNotExists ) except Exception as e : errors . append ( e ) continue return errors
create the indexes in the database .