mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
This adds the possibility to manage data on a normalized relational database in N:M relations. On the relation editor in a form, the tools to add, delete, link and unlink work (also) on the linking table if a relation is visualized as N:M relation. Configuration is done through the fields tab where on the relation a second relation can be chosen (if there is a suitable relation in terms of a second relation on the linking table). Limitations =========== QGIS is not a database management system. It is based on assumptions about the underlying database system. In particular it expects * A `ON DELETE CASCADE` or similar measure on the second relation * Does not take care of setting the primary key when adding features. Either users need to be instructed to set them manually or - if it's a database derived value - the layers need to be in transaction mode (currently only activatable through the API)
5 lines
316 B
Bash
Executable File
5 lines
316 B
Bash
Executable File
printf "[qgis_test]\nhost=localhost\ndbname=qgis_test\nuser=postgres" > ~/.pg_service.conf
|
|
psql -c 'CREATE DATABASE qgis_test;' -U postgres
|
|
psql -f $TRAVIS_BUILD_DIR/tests/testdata/provider/testdata.sql -U postgres -d qgis_test
|
|
psql -f $TRAVIS_BUILD_DIR/tests/testdata/provider/reltests.sql -U postgres -d qgis_test
|