Fix MySQL script to update sequence for profile entry