For multi-host, it may be useful to have the DB data model as a local first concept, then sync with edge nodes.
VLCN does this as an open-source library for state management and sync.
VLCN augments SQLite, giving it the power to merge changes from other peers, notify your application of changes, and traverse remote datasets.
https://vlcn.io
https://github.com/vlcn-io/cr-sqlite