Skip to content

Script unable to create base schema #89

@realmiketalbot

Description

@realmiketalbot

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:

sudo docker run -it \
  -e MERGIN__USERNAME=mergin_username \
  -e MERGIN__PASSWORD=mergin_password \
  -e CONNECTIONS="[{driver='postgres', conn_info='host=mydbhost sslmode=require dbname=_mergin user=db_user password=db_password', modified='postgis_sync_test_main', base='postgis_sync_test_base', mergin_project='workspace/postgis_sync_test', sync_file='sync_db.gpkg'}]" \
  lutraconsulting/mergin-db-sync:latest \
  python3 dbsync_daemon.py --init-from-gpkg

The postgis_sync_test_main schema is created successfully but without tables, and I receive the following (redacted) error message:

== starting mergin-db-sync daemon == version 1.1.2 ==
Logging in to Mergin...
Processing Mergin Maps project 'workspace/postgis_sync_test'
Connecting to the database...
Downloading latest Mergin Maps project workspace/postgis_sync_test to /tmp/dbsync/postgis_sync_test
Traceback (most recent call last):
  File "dbsync_daemon.py", line 63, in <module>
    main()
  File "dbsync_daemon.py", line 33, in main
    dbsync.dbsync_init(mc, from_gpkg=True)
  File "/mergin-db-sync/dbsync.py", line 666, in dbsync_init
    init(conn, mc, from_gpkg)
  File "/mergin-db-sync/dbsync.py", line 568, in init
    raise DbSyncError(f"The 'modified' schema exists but the base schema is missing: {conn_cfg.base}")
dbsync.DbSyncError: The 'modified' schema exists but the base schema is missing: postgis_sync_test_base

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions