add ld scope to node and group views in database