-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Geopackage layer rename in DB Manager does not update f_table_name values in the layer_styles table or the Triggers #29045
Comments
Author Name: Steve Lowman (Steve Lowman) I notice that there is a plugin called 'DB Style Manager', which is designed only for PostGIS connection, not for geopackages. Still, perhaps its code could help with resolving this issue for geopackages, if the resolution is not easy. Also, I wonder whether this bug also extends to PostGIS connections? I have not yet been able to test for this, as I do not yet make regular use of PostGIS. |
Author Name: Alessandro Pasotti (@elpaso)
|
Author Name: Alessandro Pasotti (@elpaso) Ok for styles: I'm working on it on PR #9164 About triggers: what triggers exactly are not updated? The current implementation relies on GDAL which does update all geopackage related triggers, if you have custom triggers then they will not be updated and it's a won't fik (IMO).
|
Author Name: Steve Lowman (Steve Lowman) Thanks Alessandro. For the Triggers, there are two of them in these layers, both seem to be about feature count - one for "insert" and the other for "delete". I do not know what they really do. I will attach an image to show these. I changed the layer name, but the previous layer name is still there for these insert and delete feature counts Triggers.
|
Author Name: Alessandro Pasotti (@elpaso) Oh, I see, it's an issue in the dialog which is not updated, the triggers are acually updated correctly in the DB but the dialog is not. |
Author Name: Steve Lowman (Steve Lowman) It is fixed in 3.6, but not fixed in the upgraded 3.4.5 LTR.
|
Author Name: Alessandro Pasotti (@elpaso) For the record: it was not fixed in 3.4 because the implementation is based on a feature which is only available in 3.6 hence a straight backport was unfortunately not feasible. |
Author Name: Steve Lowman (Steve Lowman) Is there any way to fix it in 3.4? It messes up our work flow quite badly. |
Author Name: Alessandro Pasotti (@elpaso) There are multiple ways, see this article (not written by me) http://nyalldawson.net/2016/08/how-to-effectively-get-things-changed-in-qgis/ |
Author Name: Steve Lowman (Steve Lowman) Okay, thanks, I hope I am not being put into category 7. I just work here and have very little influence over anything, but I will make a suggestion. Meanwhile, I guess you had better close this report again. |
Author Name: Alessandro Pasotti (@elpaso) Thanks for your understanding: we have very limited time resources (not to mention the ridiculously slow budget) and we have to prioritize. |
Author Name: Steve Lowman (Steve Lowman) Would you be able to recommend who best to contact to get a price estimate for fixing this in the LTR, or should I just contact someone local on the list at https://www.qgis.org/en/site/forusers/commercial_support.html ? |
Author Name: Alessandro Pasotti (@elpaso) In that list you can find a lot of qualified free-lance developers and companies (included myself), feel free to contact anyone. |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Saber Razmjooei (@saberraz)
|
Author Name: Martin Dobias (@wonder-sk) Applied in changeset 9eca405.
|
Author Name: Steve Lowman (Steve Lowman)
Original Redmine Issue: 21227
Affected QGIS version: 3.4.4
Redmine category:db_manager
Assignee: Martin Dobias
We have a geopackage file with some layers and some styles for those layers, including default styles that display when we add the layers to the map canvas.
We use DB Manager to rename one or more of the geopackage layers.
For the renamed layers, the text in the Triggers section of the DB Manager Info tab still refers to the old layer name, and we cannot edit this (I do not know what consequences this may have).
In the layer_styles table for this geopackage, viewed in the Table tab of DB Manager, the values in the f_table_name still contain the old layer names. Consequently, the correct default styles do not display when we add the layers to the Map Canvas, and in Layer Properties, the Style > Load Style > from database (Geopackage) 'Database styles manager' dialog lists nothing under 'Styles related to the layer'.
We can find the appropriate style if we look for it in the list of 'Other styles on the database', but this is a overly complicated procedure to obtain the saved style, and it is not really something we can expect our novice-to-intermediate QGIS users to do every time.
The text was updated successfully, but these errors were encountered: