gitlab-org--gitlab-foss/spec/lib/gitlab
Douwe Maan 05efd19e89 Merge branch 'dz-nested-groups' into 'master'
Add nested groups support on data level

## What does this MR do?

- [x] Add  `parent_id` field to `Namespace`model. 
- [x] Create new database table `routes` that keeps information about full path to each group or project
- [x] Remove uniq index from `namespaces.path`
- [x] Add uniq index on `routes.path`
- [x] Fill routes table with path data from namespaces and projects
- [x] Change Namespace/Project URL lookup by routes table
- [x] Rename related routes (nested groups, projects) when parent path changes

This is solely backend preparation. UI, Permissions and API support will be added in separate merge request.   
 
## Are there points in the code the reviewer needs to double check?

migrations, Route model, Routable concern

Will require downtime. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7121#note_19490281 discussion

## Why was this MR needed?

One step further to full nested groups support

## Screenshots (if relevant)

No UI changes in this merge request so far

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added~~
- ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~API support added~~
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/2772

See merge request !7121
2016-12-09 01:52:36 +00:00
..
backend Refine Git garbage collection 2016-11-04 14:30:11 +01:00
backup Fix Backup::Manager#remove_old 2016-12-07 13:27:44 +00:00
badge Fix pipeline fixtures and calls to removed method 2016-10-04 14:43:24 +02:00
bitbucket_import
chat_commands Accept `issue new` as command to create an issue 2016-12-05 10:02:21 +01:00
checks
ci Code review 2016-12-07 19:30:14 +01:00
conflict Add blob_ace_mode to conflict content response 2016-10-13 14:16:35 -05:00
cycle_analytics Update effected tests 2016-12-04 17:32:33 +01:00
data_builder refactors tests because of gitlab-test repository changes 2016-10-11 16:33:06 +01:00
database
diff Fixes ActionView::Template::Error: undefined method `text?` for nil:NilClass 2016-12-02 14:03:30 +02:00
downtime_check
email fix rubocop failures 2016-11-17 11:59:44 +09:00
fogbugz_import
gfm Add shorthand support to gitlab markdown references 2016-12-02 19:18:17 -02:00
git
github_import Use :maximum instead of :within for length validators with a 0..N range 2016-12-06 10:23:17 +01:00
gitlab_import
google_code_import Reuse LabelsFinder on Issueable#add_labels_by_names 2016-10-19 14:58:25 -02:00
graphs
import_export Add nested groups support on data level 2016-12-08 11:47:16 +02:00
ldap Centralize LDAP config/filter logic 2016-11-11 15:58:33 -06:00
metrics
middleware Use `Gitlab.config.gitlab.host` over `'localhost'` 2016-11-18 20:17:10 +08:00
o_auth Omniauth auto link LDAP user falls back to find by DN when user cannot be found by uid 2016-11-10 15:47:40 -06:00
saml
sanitizers
sherlock
slash_commands
sql
template Allow Member.add_user to handle access requesters 2016-09-28 09:43:00 +02:00
asciidoc_spec.rb
auth_spec.rb Handle LFS token creation and retrieval in the same method, and in the same Redis connection. 2016-09-28 12:13:48 -05:00
award_emoji_spec.rb
blame_spec.rb
changes_list_spec.rb
chat_name_token_spec.rb More refactoring, push present to base command 2016-11-17 21:44:26 +01:00
closing_issue_extractor_spec.rb Merge branch 'issue_23548_dev' into 'master' 2016-11-09 12:25:17 +01:00
color_schemes_spec.rb
contributions_calendar_spec.rb Merge branch '23403-fix-events-for-private-project-features' into 'security' 2016-11-09 12:27:41 +01:00
current_settings_spec.rb
database_spec.rb
downtime_check_spec.rb
exclusive_lease_spec.rb Refine Git garbage collection 2016-11-04 14:30:11 +01:00
file_detector_spec.rb Unify detecting of special repository files 2016-11-21 12:51:40 +01:00
git_access_spec.rb Merge branch 'fix-unathorized-cloning' into 'security' 2016-11-09 12:27:17 +01:00
git_access_wiki_spec.rb Improve Gitlab::GitAccessWiki spec with download access checks 2016-11-30 16:02:25 -02:00
git_spec.rb Add spec covering 'committer_hash' 2016-09-20 10:15:43 -07:00
highlight_spec.rb
identifier_spec.rb Use Commit#author so we share logic and cache 2016-11-24 02:33:55 +08:00
incoming_email_spec.rb
key_fingerprint_spec.rb
lazy_spec.rb
lfs_token_spec.rb Handle LFS token creation and retrieval in the same method, and in the same Redis connection. 2016-09-28 12:13:48 -05:00
markup_helper_spec.rb
metrics_spec.rb
optimistic_locking_spec.rb Make retry_lock to not be infinite 2016-10-27 12:34:35 +01:00
popen_spec.rb
project_search_results_spec.rb Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' 2016-11-28 21:26:23 -03:00
redis_spec.rb Updated mail_room and added sentinel support to Reply by Email 2016-10-26 05:02:47 +02:00
reference_extractor_spec.rb Merge branch 'issue_23548_dev' into 'master' 2016-11-09 12:25:17 +01:00
regex_spec.rb
search_results_spec.rb Merge branch 'jej-23867-use-mr-finder-instead-of-access-check' into 'security' 2016-12-08 21:42:07 -03:00
sidekiq_throttler_spec.rb Refactored Sidekiq Throttler and updated documentation 2016-11-11 11:14:58 -06:00
snippet_search_results_spec.rb
themes_spec.rb
upgrader_spec.rb
uploads_transfer_spec.rb
url_builder_spec.rb get rid of light url builder and fix wrong spec 2016-11-17 08:22:58 +01:00
url_sanitizer_spec.rb
user_access_spec.rb
utils_spec.rb Fix project features default values 2016-11-01 11:03:56 -02:00
version_info_spec.rb
workhorse_spec.rb Use base SHA for patches and diffs 2016-09-22 18:49:31 +01:00