Sign inSign up

lutraconsulting/mergin-db-sync

By lutraconsulting

•Updated about 2 months ago

A tool for two-way synchronization between Mergin and a PostGIS database

Image
1

50K+

lutraconsulting/mergin-db-sync repository overview

⁠DB Sync Script

This tool takes care of two-way synchronization between Mergin and another database (currently supporting PostGIS).

That means you can:

  • insert / update / delete features in PostGIS database - and the changes will get automatically pushed to a configured Mergin project
  • insert / update / delete features in a GeoPackage in Mergin project - and the changes will get automatically pushed to the PostGIS database
⁠How does it work
  • a single GeoPackage file in a Mergin project is treated as an equivalent of a database schema - both can contain multiple tables with data
  • after the initialization, DB sync tool uses "main" schema in database (where any user editing may happen) and "base" schema (where only DB sync tool is allowed to do changes)
  • the "base" schema contains the same data as the most recently known project version in Mergin, and it is used to figure out whether there have been any changes in the database - if there were, they will be pushed to the appropriate GeoPackage in Mergin project
⁠Quick start

Not sure where to start? Check out our quick start⁠ guide to set up sync between your database and a new Mergin project.

Tag summary

Content type

Image

Digest

sha256:9bb12e643…

Size

332.1 MB

Last updated

2 months ago

docker pull lutraconsulting/mergin-db-sync