Skip to content
This repository has been archived by the owner on Jun 4, 2020. It is now read-only.

foreign key violates and error in PG for SL checkout #66

Closed
gignacnic opened this issue May 22, 2017 · 1 comment
Closed

foreign key violates and error in PG for SL checkout #66

gignacnic opened this issue May 22, 2017 · 1 comment

Comments

@gignacnic
Copy link
Contributor

When doing a checkout in SpatiaLite format, views created is where the editing should occur. However, if by mistake any users edits (ex. delete, insert, etc.) in the SL tables instead of the view, it creates IntegrityError in PG later and could not commit. In checkout, no contraint (ex. foreign key : trunk_child, trunk_parent) presents in the PG tables are created in SL tables. The behaviour should be the same as SL checkout and PG checkout at the table levels with contraints, this will prevent user to delete or insert records (related to foreign keys) in SL that could not be committed back to PG.

See the details of the error of @Sameme, when trying to commit:

qgis_versioning\versioning.py", line 171, in execute
raise e
IntegrityError: insert or update on table "table_name" violates foreign key constraint "table_name_trunk_child_fkey"
DETAIL: Key (trunk_child)=(320) is not present in table "table_name".

@gignacnic gignacnic changed the title foreign key violates error in PG for SL checkout foreign key violates and error in PG for SL checkout May 22, 2017
@SebastienPeillet
Copy link

Project migrated to : https://gitlab.com/Oslandia/qgis/qgis-versioning

@delhomer delhomer closed this as completed Jun 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants