db-sync
db-sync copied to clipboard
Document how to restart failed sync
Sometimes users modify structure of their database and this naturally breaks db-sync. It would be good to document how to restart db-sync when this happens.
If the "source" is a geopackage in Mergin project (where the database structure change happened), this boils down to these steps:
- delete "base" and "main" schemas in PostgreSQL
- start mergin-db-sync again with
--init-from-gkpg
If the source is PostgreSQL:
- delete "base" schema in PostgreSQL and the geopackage in the Mergin project
- start mergin-db-sync again with
--init-from-db