MerginMaps / db-sync

A tool for two-way synchronization between Mergin Maps and a PostGIS database
https://merginmaps.com
MIT License
45 stars 20 forks source link

Confusing errors reported when db-sync starts #65

Open wonder-sk opened 2 years ago

wonder-sk commented 2 years ago

When user starts db-sync, one of the geodiff calls produces a bunch of errors that are reported to the user. But these errors are not actual problems, and they just confuse users into thinking that something went wrong. I believe the failing queries are coming from libgpkg library, it would be good to find a way how to silence them:

GEODIFF: Error: SQLITE3: (1)no such table: main.gpkg_contents in "SELECT count(*) FROM "main".gpkg_contents WHERE data_type LIKE 'features'"
Error: SQLITE3: (1)no such table: main.gpkg_contents in "SELECT count(*) FROM "main".gpkg_contents WHERE data_type LIKE 'tiles'"
Error: SQLITE3: (1)no such table: main.gpkg_contents in "SELECT count(*) FROM "main".gpkg_contents WHERE data_type LIKE 'tiles'"
Error: SQLITE3: (1)no such table: main.gpkg_contents in "SELECT count(*) FROM "main".gpkg_contents WHERE data_type LIKE 'features'"
Error: SQLITE3: (1)no such table: main.gpkg_contents in "SELECT count(*) FROM "main".gpkg_contents WHERE data_type LIKE 'tiles'"
Error: SQLITE3: (1)no such table: main.gpkg_contents in "SELECT count(*) FROM "main".gpkg_contents WHERE data_type LIKE 'tiles'"
Error: SQLITE3: (1)no such table: main.gpkg_contents in "SELECT count(*) FROM "main".gpkg_contents WHERE data_type LIKE 'features'"
Error: SQLITE3: (1)no such table: main.gpkg_contents in "SELECT count(*) FROM "main".gpkg_contents WHERE data_type LIKE 'tiles'"
Error: SQLITE3: (1)no such table: main.gpkg_contents in "SELECT count(*) FROM "main".gpkg_contents WHERE data_type LIKE 'tiles'"
PeterPetrik commented 2 years ago

these can also be seen in the geodiff output for automatic tests, good way how to detect them