Terrastories / terrastories

Terrastories is a geostorytelling application for mapping, managing and sharing place-based stories.
https://terrastories.app
MIT License
316 stars 157 forks source link

[Import/export] Ensure that duplicate items cannot be added to the database #224

Closed rudokemper closed 3 years ago

rudokemper commented 5 years ago

Currently when the Stories and Places CSV file are imported, if it's run again it will add duplicate records.

Let's add validations to the Stories and Places models to ensure that duplicates cannot be created, and that the CSV importer can do idempotent imports.

Validations are already in place for the Speakers importer, the logic for which can be used to update the Places and Stories importers as well.

rgenchev commented 4 years ago

Can I help with adding validations, indexes and tests for Story model? I could do that in a new PR.

mirandawang commented 4 years ago

Some work has started here, but can be picked up by whoever is available! https://github.com/Terrastories/terrastories/pull/274