mapseed/platform

Move places to a different dataset

Opened this issue · 1 comments

As we begin to roll out different flavors that use multiple datasets, it's going to be necessary to move a place from one dataset to another in the inevitable situation that a submitted place is filed in the wrong dataset.

How difficult is this?

I think this functionality might already be implemented, although not updated to support multiple datasets in the way we handle them.

If you click on a place in the admin panel, you can reassign the dataset to which a place belongs by clicking on the magnifying glass icon by the dataset field. What probably won't work, though, are the datasetId and datasetSlug parameters in the JSON blob. These would need to be updated to reference the new dataset's id and slug so the place's url works correctly on the front end.

We could write some code to update the slug and id (or, in the meantime, the update can be done manually from within the admin panel JSON editor that's available for each place), although I think a more robust solution would be to build out the database model so we store the slug and id in their own columns in the dataset table, instead of just as a text blob. The slug and id are now critical parts of a place's model, but we're not really treating them as such in the database.

Thoughts?