pub fn write_schema_version(db: &Database, version: u32) -> Result<()>
Write the schema version to the database.