Re-enable namespace's has_parent?
In Namespace model we could check only parent_id
presence to detect if a namespace has parent or not, but currently this optimization was reverted (!27668 (merged)) until we have a foreign key constraint on parent_id
column. Once we add the constraint (#211927 (closed)) we can re-enable this optimization.