Closed realmiketalbot closed 1 year ago
Some other potentially useful info:
hi @realmiketalbot - sorry to hear you are having troubles.
Your command to run db-sync looks sensible, but the error you have posted here (The 'modified' schema exists but the base schema is missing
) looks like this is not the first time you have run the command - and this error is just due to a previously failed initialization. Could you please try to delete the postgis_sync_test_main
schema and re-run db-sync? In the output you should the see a line saying The base and modified schemas do not exist yet, going to initialize them
- and then if the init fails, some other error should show up instead. It would be useful to post that error here so we can find out what went wrong...
You're right - I was mistakenly looking at the error message from a subsequent run of the script.
I was able to find the issue from this error message:
The base and modified schemas do not exist yet, going to initialize them ...
Error: copy failed!
GEODIFF: NOTICE: schema "postgis_sync_test_main" does not exist, skipping
Error: postgres cmd error: ERROR: permission denied for function postgis_typmod_type
What fixed it was dropping and recreating the database, this time setting the owner to my mergin user on create, then running CREATE EXTENSION postgis
. I see now that this is exactly what's in the documentation, but I'm not using a local PostgreSQL installation so I had skipped over that.
Thanks!
I've been able to successfully authenticate to both Mergin and my PostgreSQL cluster, but the script appears to be having trouble creating the base schema. Here's my (redacted) command:
The
postgis_sync_test_main
schema is created successfully but without tables, and I receive the following (redacted) error message: