Clear invalid update_locks during DB upgrade
Clear invalid updates before adding foreign key
Fix typo (settings -> setting)