Provides the core BDE schemas and functions that are used for storing and accessing raw BDE exports from the Landonline database system.
Refer to LINZ::Bde documentation for further information about raw BDE exports format.
First install the project into the OS data share directory:
sudo make install
Then you can load the schema into a target database
linz-bde-schema-load $DB_NAME
If you don't want to install the indexes, add --noindexes to the
linz-bde-schema-load` invocation:
linz-bde-schema-load --noindexes $DB_NAME
If you would like to revision the table, add --revision
to the linz-bde-schema-load
invocation:
linz-bde-schema-load --noindexes --revision $DB_NAME
Add --noextension
switch if required extensions are not available on the database system.
NOTE: the loader script will expect to find SQL scripts under /usr/share/linz-bde-schema/sql
, if
you want them found in a different directory you can set the BDESCHEMA_SQLDIR
environment
variable.
You can upgrade the schema in an existing database by following the install procedure. The
linz-bde-schema-load
script is able to both install or upgrade databases.
WARNING: upgrades from version 1.0.2 to 1.1.2 will leave database in an inconsistent state due to a broken schema patch found in such release. The patch was absent in previous releases and fixed in later releases so upgrades from them will be ok.
Prerequisites: Nix
Run nix-shell --pure --run 'pre-commit run --all-files'
.
Testing is done using pg_regress
and PgTap
. To run the tests run the following command:
make check
Build the debian packages using the following command:
dpkg-buildpackage -us -uc
Requires PostgreSQL and PostGIS on the target database system, dbpatch and optionally table_version.
This project is under 3-clause BSD License, except where otherwise specified. See the LICENSE file for more details.