summaryrefslogtreecommitdiff
path: root/db
Commit message (Collapse)AuthorAgeFilesLines
* Incorporate feedbackZ.J. van de Weg2016-07-292-4/+1
|
* Add an URL field to EnvironmentsZ.J. van de Weg2016-07-292-1/+14
| | | | | This MR adds a string (thus max 255 chars) field to the enviroments table to expose it later in other features.
* Implement final review comments from @rymai.Timothy Andrew2016-07-296-2/+46
| | | | | | | | | | | | | | | | 1. Instantiate `ProtectedBranchesAccessSelect` from `dispatcher` 2. Use `can?(user, ...)` instead of `user.can?(...)` 3. Add `DOWNTIME` notes to all migrations added in !5081. 4. Add an explicit `down` method for migrations removing the `developers_can_push` and `developers_can_merge` columns, ensuring that the columns created (on rollback) have the appropriate defaults. 5. Remove duplicate CHANGELOG entries. 6. Blank lines after guard clauses.
* Use `Gitlab::Access` to protected branch access levels.Timothy Andrew2016-07-293-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. It makes sense to reuse these constants since we had them duplicated in the previous enum implementation. This also simplifies our `check_access` implementation, because we can use `project.team.max_member_access` directly. 2. Use `accepts_nested_attributes_for` to create push/merge access levels. This was a bit fiddly to set up, but this simplifies our code by quite a large amount. We can even get rid of `ProtectedBranches::BaseService`. 3. Move API handling back into the API (previously in `ProtectedBranches::BaseService#translate_api_params`. 4. The protected branch services now return a `ProtectedBranch` rather than `true/false`. 5. Run `load_protected_branches` on-demand in the `create` action, to prevent it being called unneccessarily. 6. "Masters" is pre-selected as the default option for "Allowed to Push" and "Allowed to Merge". 7. These changes were based on a review from @rymai in !5081.
* Implement review comments from @dbalexandre.Timothy Andrew2016-07-296-56/+0
| | | | | | | | | | | | | | | | 1. Remove `master_or_greater?` and `developer_or_greater?` in favor of `max_member_access`, which is a lot nicer. 2. Remove a number of instances of `include Gitlab::Database::MigrationHelpers` in migrations that don't need this module. Also remove comments where not necessary. 3. Remove duplicate entry in CHANGELOG. 4. Move `ProtectedBranchAccessSelect` from Coffeescript to ES6. 5. Split the `set_access_levels!` method in two - one each for `merge` and `push` access levels.
* Add seeds for protected branches.Timothy Andrew2016-07-291-0/+12
|
* Add a series of migrations changing the model-level design of protected ↵Timothy Andrew2016-07-297-4/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | branch access levels. 1. Remove the `developers_can_push` and `developers_can_merge` boolean columns. 2. Add two new tables, `protected_branches_push_access`, and `protected_branches_merge_access`. Each row of these 'access' tables is linked to a protected branch, and uses a `access_level` column to figure out settings for the protected branch. 3. The `access_level` column is intended to be used with rails' `enum`, with `:masters` at index 0 and `:developers` at index 1. 4. Doing it this way has a few advantages: - Cleaner path to planned EE features where a protected branch is accessible only by certain users or groups. - Rails' `enum` doesn't allow a declaration like this due to the duplicates. This approach doesn't have this problem. enum can_be_pushed_by: [:masters, :developers] enum can_be_merged_by: [:masters, :developers]
* Remove project which can't be pulled while seedingZ.J. van de Weg2016-07-281-1/+0
| | | | [ci skip]
* Fix missing schema update for 20160722221922Stan Hu2016-07-261-1/+1
|
* Merge branch 'filter-branch-by-name' into 'master' Douwe Maan2016-07-251-7/+8
|\ | | | | | | | | | | | | | | | | Users can filter branches by name on project branches page This MR aims to solve #18674 by adding the possibility to filter project branches by name ![Screen_Shot_2016-07-07_at_17.21.25](/uploads/b674765d2b1cb8a121c2101715a4568b/Screen_Shot_2016-07-07_at_17.21.25.png) See merge request !5144
| * Merge branch 'master' of gitlab.com:gitlab-org/gitlab-cetiagonbotelho2016-07-221-2/+3
| |\
| * \ Merge branch 'master' of gitlab.com:gitlab-org/gitlab-cetiagonbotelho2016-07-216-7/+92
| |\ \
| * \ \ Merge branch 'master' of gitlab.com:gitlab-org/gitlab-cetiagonbotelho2016-07-203-2/+16
| |\ \ \
| * | | | updates local schematiagonbotelho2016-07-201-7/+8
| | | | |
* | | | | Fix bug where replies to commit notes displayed in the MR discussion tab ↵Douwe Maan2016-07-231-0/+9
| |_|_|/ |/| | | | | | | | | | | wouldn't show up on the commit page
* | | | Don't drop in DropAndReaddHasExternalWikiInProjectsfix-has-external-wiki-migrationYorick Peterse2016-07-211-2/+3
| |_|/ |/| | | | | | | | | | | | | | | | | Dropping a column and then re-adding it can lead to the application throwing errors as the column may temporarily not exist. To work around this we'll reset the various project rows in batches _without_ removing any columns.
* | | Fix migration to make it fastRémy Coutable2016-07-212-13/+14
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Make Service.external_wikis return only active external wikisRémy Coutable2016-07-212-1/+14
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch 'email-domain-blacklist' into 'master' Robert Speicher2016-07-203-1/+46
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added the ability to block sign ups using a domain blacklist. As part of this MR, I restructured the Application Settings form to separate **Sign up** related settings from **Sign in** related settings and make everything cleaner and easier to read. Fixes #19749 Related to #5573 See merge request !5259
| * | | Refactor and rename `restricted_signup_domains` to `domain_whitelist` to ↵Patricio Cano2016-07-182-1/+22
| | | | | | | | | | | | | | | | better conform to its behavior and newly introduced behavior.
| * | | Added the ability to block sign ups using a domain blacklist.Patricio Cano2016-07-182-0/+24
| | | |
* | | | Allow to disable user request access to groups/projectsFelipe Artur2016-07-203-5/+31
| |_|/ |/| |
* | | Merge branch 'external-wiki-helper-speedup' into 'master' Yorick Peterse2016-07-202-1/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | speed up ExternalWikiService#get_project_wiki_path ## What does this MR do? Speed up ExternalWikiHelper#get_project_wiki_path ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? See issue #19886 ## What are the relevant issue numbers? #19886 ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5305
| * | | speed up ExternalWikiService#get_project_wiki_pathEugene Howe2016-07-192-1/+9
| | |/ | |/| | | | | | | | | | | | | | | | | | | * This method previously iterated over all services in a project. Now it will directly query the ExternalWikiService for the project and filter by active state. * The presence of an external wiki is also cached * When an external wiki is added or removed, the cached value is updated
* | | prevent algorithm and key length issue for upgrades from an older GilLab ↵James Lopez2016-07-201-1/+7
|/ / | | | | | | version - 8.6 or earlier
* | Merge branch 'manual-actions' into 'master' Rémy Coutable2016-07-191-15/+48
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | Add support for manual CI actions ## What does this MR do? This implements a `when: manual` which allows a jobs to be marked as manual actions. Manual actions have to be explicitly executed by developers. ## What are the relevant issue numbers? This is to solve: https://gitlab.com/gitlab-org/gitlab-ce/issues/17010 See merge request !5297
| * Improve code designKamil Trzcinski2016-07-181-1/+1
| |
| * Update build fixtures to include manual actionsKamil Trzcinski2016-07-181-15/+48
| |
* | Merge branch 'undo-revert-of-4892' into 'master' 19396-api-allow-admin-owner-to-set-timestamp-when-changing-issue-stateRémy Coutable2016-07-183-4/+22
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | Revert "Revert "Merge branch '18193-developers-can-merge' into 'master'"" ## What does this MR do? Reverts the revert of !4892 which lacked an EE MR at the time. This has been done in gitlab-org/gitlab-ee!564. ## What are the relevant issue numbers? Closes #19872. See merge request !5310
| * Remove `lock_version` from the `merge_requests` table.undo-revert-of-4892Timothy Andrew2016-07-181-1/+0
| | | | | | | | | | | | | | - This was introduced (at some point) while rebasing `master` against the "developers can merge" feature branch. - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5310#note_13139705
| * Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' ""Rémy Coutable2016-07-183-4/+23
| | | | | | | | | | | | | | | | This reverts commit 530f5158e297f3cde27f3566cfe13bad74ba3b50. See !4892. Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Disable transaction when adding index for Ci::PipelineKamil Trzcinski2016-07-181-0/+2
| |
* | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵store-variables-and-when-in-builds-tableKamil Trzcinski2016-07-184-29/+26
|\ \ | | | | | | | | | | | | | | | | | | store-variables-and-when-in-builds-table # Conflicts: # db/schema.rb
| * \ Merge branch 'track-pipeline-user' into 'master' Rémy Coutable2016-07-183-1/+17
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Track a user who creates a Pipeline ## What does this MR do? This adds additional column to pipelines to track user who is creating pipelines. ## Why was this MR needed? This is to make it possible to show all pipelines created by specific user and to later solve: https://gitlab.com/gitlab-org/gitlab-ce/issues/18054 ## What are the relevant issue numbers? Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/18992 - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5272
| | * Make rubocop happytrack-pipeline-userKamil Trzcinski2016-07-151-1/+1
| | |
| | * Add index for user_id of pipelineKamil Trzcinski2016-07-152-1/+9
| | |
| | * Track a user who created a pipelineKamil Trzcinski2016-07-152-1/+9
| | |
| * | Revert "Optimistic locking for Issue and Merge Requests"revert-lock-for-issuableStan Hu2016-07-132-29/+10
| |/ | | | | | | This reverts commit c39356998b1850f3dc26fe0b987cb419c1d1afb4.
* | Remove irrelevant commentsKamil Trzcinski2016-07-161-14/+0
| |
* | Fix AddWhenAndYamlVariablesToCiBuilds migrationKamil Trzcinski2016-07-161-1/+1
| |
* | Store when and yaml variables in builds tableKamil Trzcinski2016-07-162-1/+25
|/
* Revert "Merge branch '18193-developers-can-merge' into 'master' "Robert Speicher2016-07-133-22/+3
| | | | | This reverts commit 9ca633eb4c62231e4ddff5466c723cf8e2bdb25d, reversing changes made to fb229bbf7970ba908962b837b270adf56f14098f.
* Enforce "developers can merge" during `pre-receive`.Timothy Andrew2016-07-132-0/+9
| | | | | | | | | | | | | | 1. When a merge request is being merged, save the merge commit SHA in the `in_progress_merge_commit_sha` database column. 2. The `pre-receive` hook looks for any locked (in progress) merge request with `in_progress_merge_commit_sha` matching the `newrev` it is passed. 3. If it finds a matching MR, the merge is legitimate. 4. Update `git_access_spec` to test the behaviour we added here. Also refactored this spec a bit to make it easier to add more contexts / conditions.
* Added "developers can merge" setting to protected branchesMathias Vestergaard2016-07-132-3/+13
| | | | | - Cherry-picked from `mvestergaard:branch-protection-dev-merge` - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4220
* Delete award emoji when deleting a user19693-emoji-awards-aren-t-deleted-for-deleted-usersSean McGivern2016-07-122-1/+22
|
* Optimistic locking for Issue and Merge RequestsValery Sizov2016-07-122-11/+30
|
* Merge branch 'fix/remove-import-url-migration' into 'master' Rémy Coutable2016-07-111-106/+0
|\ | | | | | | | | | | | | | | | | Remove slow migration and add fix to sanitize errors Getting rid of the slow migration and preventing the Error to occur Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19608 See merge request !5176
| * remove fix validatable import url migrationJames Lopez2016-07-111-106/+0
| |
* | Merge branch 'fix-broken-mysql-migration' into 'master' Robert Speicher2016-07-081-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | Fix broken migration in MySQL `keys` is a reserved name in MySQL, so if this migration actually attempted to remove any duplicate keys it would fail. Closes #19344 See merge request !5005
| * Fix missing quote_table_nameStan Hu2016-06-291-1/+1
| |