summaryrefslogtreecommitdiff
path: root/app/models/fork_network.rb
Commit message (Collapse)AuthorAgeFilesLines
* Inherit from ApplicationRecord instead of ActiveRecord::BaseNick Thomas2019-03-281-1/+1
|
* Enable frozen string in app/models/*.rbrepo-forks/gitlab-ce-frozen-string-enable-app-modelsgfyoung2018-07-261-0/+2
| | | | Partially addresses #47424.
* Revert the addition of goldiloaderYorick Peterse2018-04-181-1/+1
| | | | | | | | | This reverts the addition of the "goldiloader" Gem and all use of it. While this Gem is very promising it's causing a variety of problems on GitLab.com due to it eager-loading too much data in places where we don't expect/can handle this. At least for the time being this means we have to go back to manually fixing N+1 query problems, but at least those should not cause a negative impact on availability.
* Add cop for has_many :through without disabled autoloadingfix-n-plus-one-when-getting-notification-settings-for-recipientsSean McGivern2018-04-091-1/+1
| | | | | | | | | | | | | Goldiloader is great, but has several issues with has_many :through relations: * https://github.com/salsify/goldiloader/issues/12 * https://github.com/salsify/goldiloader/issues/14 * https://github.com/salsify/goldiloader/issues/18 Rather than try to figure out which applies in each case, we should just do the drudge work of manually disabling autoloading for all relations of this type. We can always use regular preloading for specific cases, but this way we avoid generating invalid queries through Goldiloader's magic.
* Unlink a project from a fork network when it's source was deleted.Bob Van Landuyt2017-11-031-0/+4
| | | | | We need to close all merge requests coming from the project within the entire fork network.
* Find forks within users/namespaces using fork membershipsBob Van Landuyt2017-10-071-0/+4
|
* Create a fork network when forking a projectBob Van Landuyt2017-10-071-1/+9
| | | | | When no fork network exists for the source projects, we create a new one with the correct source
* Add a model for `fork_networks`Bob Van Landuyt2017-10-071-0/+3
The fork network will keep track of the root project as long as it's present.