azerbini / eamena_dev

Arches is a web-based, geospatial information system for cultural heritage inventory and management.
GNU Affero General Public License v3.0
1 stars 2 forks source link

Allow import of resources that already have a value for EAMENA_ID nodes #98

Open mradamcox opened 5 years ago

mradamcox commented 5 years ago

User Story

When moving resources from one installation to another, and also for general longevity, we need to alter the EAMENA functionality that creates unique ids in such a way that it will not run during import if the imported resources already have an EAMENA ID.

Notes:

If a user attempts to import a resource with an EAMENA ID that matches an existing ID in the database. I think the import should break, and perhaps rollback all the resources that have been created to that point. This is because if an upload file duplicates an existing ID, there is a larger problem going on with the database or the file.

Solving this for JSON import should be the same as solving it for .arches import.

Acceptance Criteria

Definition of Done

Exporting a JSON file from the command line, removing all resources from the database, and then importing the JSON file should work properly, and EAMENA IDs should be preserved, just like all other resources.