As a work around, I made startup scripts for Linux and Windows, that will alter the db before launching DT as briefly written here Migrating darktable to Ubuntu from macOS - #23 by Till80.
That solved the problem with switching OS in the past quite efficiently. But right now I edit images only on Linux, so I stopped using it.