Change on duplicate to updates in predb to work with MySQL and PgSQL.