Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move places to a different dataset #528

Open
futuresoup opened this issue Nov 16, 2016 · 1 comment
Open

Move places to a different dataset #528

futuresoup opened this issue Nov 16, 2016 · 1 comment

Comments

@futuresoup
Copy link
Contributor

futuresoup commented Nov 16, 2016

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?

@goldpbear
Copy link
Contributor

goldpbear commented Nov 22, 2016

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants