handle existing repository and gracefully update

until now, you get a unique key violation because the project already exists