write new leases to couchdb