Make sure we have a db lock when updating the schema table