It was possible for the `routes.name` field to be `NULL`, causing
`name_was` to be `nil` after a rename, resulting a bad first argument to
`sub` when attempting to rename descendants. This change adds a
condition to make sure `name_was` is present before attempting the
descendant update.
Given group `gitlab` and `gitlab-org` exists. When rename `gitlab` it
will rename `gitlab-org` group route too. This commit fixes it
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* add parent_id field to namespaces table to store relation with nested groups
* create routes table to keep information about full path of every group and project
* project/group lookup by full path from routes table
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>