Should only be done if mongodb is used.