Migration query for rights.