db now uses WAL mode, checks for sqlite 3.7+