i.sentinel.mask: adapt for non-SQlite vector databases #540
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adaps i.sentinel.mask such that it works in a mapset with a non-SQlite vector database connection. SQlite allows some simplifications of commands that are not possible in other systems (tested here with PostgreSQL):
v.db.addtable
to also add new columns, the datatype of the column must be indicatedv.db.droptable
only works if the table exists in the database, it will otherwise throw an error. Because of this, a check is now implemented beforehandv.to.db
already creates an appropriate column so it is not necessary to create the column withv.db.addcolumn
beforehand.