summaryrefslogtreecommitdiff
path: root/app/models/storage
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated uses of attribute_changed?9932-fix-deprecated-attribute_changed-ceHeinrich Lee Yu2019-04-301-1/+1
| | | | Prepares us for upgrade to Rails 5.2
* Refactored AfterRenameService to reduce couplingGabriel Mazetto2019-01-222-6/+7
| | | | | | | | | | | We still rely on the Dirty API for project rename (before/after) values, but we don't access the dirty api from the service class anymore. The previous value is now part of the initialization, which makes it easier to test and the behavior is clearer. The same was done with the `rename_repo` on the Storage classes, we now provide before and after values as part of the method signature.
* Rename the Repository table to PoolRepositoryZeger-Jan van de Weg2018-11-271-3/+5
| | | | | | | | | | | | | | | | | | | To separate the different kinds of repositories we have at GitLab this table will be renamed to pool_repositories. A project can, for now at least, be member of none, or one of these. The table will get additional columns in a later merge request where more logic is implemented for the model. Further included is a small refactor of logic around hashing ids for the disk_path, mainly to ensure a previous implementation is reusable. The disk_path for the pool_repositories table no longer has a NOT NULL constraint, but given the hashing of the ID requires the DB to assign the record an ID, an after_create hook is used to update the value. A related MR is: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23143, adding tables for 'normal' repositories and wiki_repositories.
* Enable frozen string in rest of app/models/**/*.rbgfyoung2018-08-102-0/+4
| | | | Partially addresses #47424.
* Gitlab::Shell works on shard name, not pathZeger-Jan van de Weg2018-04-252-6/+6
| | | | | | | | | | | Direct disk access is done through Gitaly now, so the legacy path was deprecated. This path was used in Gitlab::Shell however. This required the refactoring in this commit. Added is the removal of direct path access on the project model, as that lookup wasn't needed anymore is most cases. Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
* Refactor Hashed Storage migration to add additional migration stepsGabriel Mazetto2017-11-231-1/+0
|
* Add support to migrate existing projects to Hashed Storage asynchashed-storage-migration-pathGabriel Mazetto2017-09-281-0/+1
|
* Use `@hashed` prefix for hashed paths on disk, to avoid collision with ↵Gabriel Mazetto2017-08-221-2/+4
| | | | existing ones
* Refactor project and storage typesGabriel Mazetto2017-08-222-77/+11
|
* Removed some useless code, codestyle changes and removed an indexGabriel Mazetto2017-08-221-2/+2
|
* Fix repository reloading in some specsGabriel Mazetto2017-08-222-4/+4
|
* Moving away from the "extend" based factory to a more traditional one.Gabriel Mazetto2017-08-222-0/+157
Using `extend` dynamically can lead to bad performance as it invalidates the method's cache.