Fix schema update to work on non-mysql databases i.e. pgsql