Updated some SQL scripts.

The update script will now safely fail and allows it to be rerun in the event that something does fail.