Skip to content

Releases: lpoaura/GN2PG

1.6.5

11 Jun 13:38
1b8ceb3
Compare
Choose a tag to compare

Fixes

  • Fix trigger to populate additional data (fix #73).

Version note

If you are using triggers to automatically populate GeoNature database, you should apply new SQL scripts:

pip install --upgrade gn2pg-client
gn2pg_cli --custom-script to_gnsynthese <myconfigfile>
psql -d <database name> -c 'UPDATE gn2pg_import.data_json SET item=item;'

Full Changelog: 1.6.4...1.6.5

1.6.4

24 Apr 14:37
Compare
Choose a tag to compare

What's Changed

Other Changes

Full Changelog: 1.6.3...1.6.4

1.6.3

11 Apr 09:32
Compare
Choose a tag to compare

What's Changed

Other Changes

New Contributors

Full Changelog: 1.6.2...1.6.3

1.6.2

08 Apr 15:23
Compare
Choose a tag to compare

Full Changelog: v1.6.1...1.6.2

v1.6.1

23 Jan 09:05
Compare
Choose a tag to compare

What's Changed

  • fix readthedocs config
  • update dependencies

Full Changelog: v1.6.0...v1.6.1

v1.6.0

27 Sep 14:36
f14cd0d
Compare
Choose a tag to compare

What's Changed

  • fix email conflict error on t_roles by not populating email by @lpofredc in #46
  • fix Erreur en fin d'update sur 'total_filtered' #49

❗ Caution

If GeoNature sources are on latest versions (v2.13.x), ensure that Utils-Flask-SQLAlchemy is version 0.3.6+ as mentionned in #48.

📝 Update

pip install --upgrade gn2pg-client

If client database is a GeoNature DB, apply last SQL Scripts

gn2pg_cli --custom-script to_gnsynthese <myconfigfile>

Full Changelog: v1.5.1...v1.6.0

v1.5.1

29 May 15:15
5b545c9
Compare
Choose a tag to compare

What's Changed

  • Refactor/tognsynthese optimisation by @ophdlv in #44
  • Docs: update Changelogs

With the financial support of Office français de la biodiversité.

Full Changelog: v1.5.0...v1.5.1

v1.5.0

03 May 12:49
a9a9c7e
Compare
Choose a tag to compare

What's Changed

❗ The minimum version of the source GeoNature instance required for the incremental update must be a version 2.12.0

With the financial support of Office français de la biodiversité.

New Contributors

Full Changelog: v1.4.0...v1.5.0

v1.4.0

08 Feb 23:49
908a969
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.3.0...v1.4.0

ToDo on update

Unused database table datasets_json can be dropped:

BEGIN;
DROP TABLE gn2pg_import.datasets_json;
COMMIT;

v1.3.0

04 May 10:17
Compare
Choose a tag to compare

Changes

  • Add optional query strings on API calls, almost required to order export API using key orderby

TODO

On client side

pip install --upgrade gn2pg-client
  • for those who use gn2pg to populate a GeoNature database, you must apply new to_gnsynthese.sql script. To proceed, simply execute:
gn2pg_cli --custom-script to_gnsynthese <yourconfigfile>

You must also update your config file to add a custom query string to order results by id_synthese as mentionned in template and docs:

# Source configuration,
# Duplicate this block for each source (1 source = 1 export)
[[source]]
# Source name, will be use to tag stored data in import table
name = "Source1"
# GeoNature source login
user_name = "<monuser>"
# GeoNature source password
user_password = "<monPwd>"
# GeoNature source URL
url = "<http://geonature1/>"
# GeoNature source Export id
export_id = 1
data_type = "synthese_with_metadata"
# GeoNature ID application (default is 3)
id_application = 1
# Additional export API QueryStrings to filter or order data, you can add multiple columns by separating column names with ":"
[source.query_strings]
orderby = 'id_synthese'

If you upgrade directly from version before 1.2.0, A unique constraint on utilisateurs.t_roles.uuid_role is required. A PR have been proposed to PnX-SI/UsersHub-authentification-module#46. Or you can add this manually with this query:

ALTER TABLE utilisateurs.t_roles
    ADD CONSTRAINT t_roles_uuid_un_tmp
        UNIQUE (uuid_role)
;

On provider side

  • actors identify informations have been restructured in synthese_with_metadata view. you must apply new scripts provided in in data/source_sample.

  • Export API with LIMIT OFFSET can return unordered results as mentionned in PostgreSQL documentation, to solve this issue, waiting an official new relase of module [PnX-SI/Utils-Flask-SQLAlchemy], you must patch geonature dependency by changing those lines in file ~/geonature/backend/venv/lib/python3.7/site-packages/utils_flask_sqla/generic.py

https://github.com/PnX-SI/Utils-Flask-SQLAlchemy/blob/b99be4e455b6e9e2577c02176f3dab7fedccb01b/src/utils_flask_sqla/generic.py#L232#L232

with

https://github.com/PnX-SI/Utils-Flask-SQLAlchemy/blob/ae487010e220fb3f7dfbec29314343936c9b3344/src/utils_flask_sqla/generic.py#L224#L224-L236