Improve SQLite compat

Fix error that can be seen here https://integration.mediawiki.org/ci/job/mwext-EducationProgram-testextensions-master/169/console

Change-Id: I8dc631869fcf6a68767676b42d4fe9aa0a2cb4ac