Couchbase-lite and sync-gateway staging amends