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
Add option to remove layer from repository #18
Comments
I don't think that'll work. @olsen232 — is dropping the table in the working copy the right approach, or should we add a |
yes, i was just trying to figure out how to do it...but I guess that it's a much better solution to have a dedicated command |
You can delete a table in the working copy and then commit that. But I have nothing against a Background: There is an asymmetry here in kart at the moment - there is a dedicated command to to create a new dataset, |
@olsen, @rcoup 232 Some comments about this, in case it can be useful for eventually adding that Kart command: Apparently, you can delete a layer like that, and it works, but it can give problems later on. I had a repo with two layers, removed one of them, and it was ok. But later I tried to reset the main branch to a few commits before (where it still had two layers), and got this error:
Looks like, apart from deleting the layer table itself, other stuff has to be removed. It works fine if, instead of just deleting the table with a DROP TABLE sentence you use gdal like this:
This will correctly clean the gpkg and update all tables. I have added this to the plugin, but I would say it is safer to have the command in Kart, so users have an easy and safe way of removing a layer. |
Yeah, would prefer to wait until Kart has the functionality rather than adding at a QGIS plugin level. eg: the above won't clean up the |
@hamishcampbell @rcoup Not sure how this is done in Kart, since I could not find a command for it.
Should the plugin just delete the table in the repo database and then commit?
The text was updated successfully, but these errors were encountered: