mirror of
https://github.com/dataelement/bisheng.git
synced 2026-08-29 01:22:31 +08:00
00d23dadb1
DaMeng selects the active schema through the dmPython 'schema' connect kwarg (default = login user). SQLAlchemy maps a URL path (/SCHEMA) to the 'database' kwarg, which dmPython rejects, so the old code stripped the path for the sync engine only -- making sync (login user) and async (path schema) diverge. Replace _dm_sync_url with _normalize_dm_url: at construction, move any path- or query-specified schema into ?schema= and clear the path, so the sync (dmPython) and async (dmAsync) engines share one normalized URL and resolve to the same schema. Explicit ?schema= wins over the path. Verified live (sync+async) against DM and with unit tests. Documented the ?schema= convention in deployment docs and the config template.