converting from postgres to mysql