def index_foreign_keys(path, load_extension):
    """
    Ensure every foreign key column has an index on it

    Example:

    \b
        sqlite-utils index-foreign-keys chickens.db
    """
    db = sqlite_utils.Database(path)
    _load_extensions(db, load_extension)
    db.index_foreign_keys()

    Ensure every foreign key column has an index on it

    Example:

    
        sqlite-utils index-foreign-keys chickens.db
    
sqlite_utils/cli.py