[CLC-1198] More attempts to get sqlite to behave nicely

JIRA: https://jira.media.berkeley.edu/jira/browse/CLC-1198

Apologies for the noise, hopefully this will do the trick.