The old approach opened the database an extra time to enable WAL mode, but more recent persistent-sqlite has a better API to enable it.
Refactored some common code into initDb. This only deals with the problem when creating new databases. If a repo got bad permissions into it, it's up to the user to deal with it. This commit was sponsored by Ole-Morten Duesund on Patreon.