WIP; change the table names since they're now in a dedicated database. Start migrating from ON DUPLICATE to an INSERT / UPDATE.