Commit graph

10 commits

Author SHA1 Message Date
Zeger-Jan van de Weg
fff7754186
Rename the Repository table to PoolRepository
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.
2018-11-27 13:41:46 +01:00
gfyoung
32af384adf Enable frozen string in rest of app/models/**/*.rb
Partially addresses #47424.
2018-08-10 00:51:01 -07:00
Zeger-Jan van de Weg
ec4423665c
Gitlab::Shell works on shard name, not path
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
2018-04-25 13:36:22 +02:00
Gabriel Mazetto
0a4d55a1c9 Refactor Hashed Storage migration to add additional migration steps 2017-11-23 14:19:36 +01:00
Gabriel Mazetto
f4de14d71f
Add support to migrate existing projects to Hashed Storage async 2017-09-28 16:32:14 +01:00
Gabriel Mazetto
02737b8508 Use @hashed prefix for hashed paths on disk, to avoid collision with existing ones 2017-08-22 06:33:20 +02:00
Gabriel Mazetto
d17a7be830 Refactor project and storage types 2017-08-22 06:33:20 +02:00
Gabriel Mazetto
fff5ebdcae Removed some useless code, codestyle changes and removed an index 2017-08-22 06:33:20 +02:00
Gabriel Mazetto
95a270c871 Fix repository reloading in some specs 2017-08-22 06:33:20 +02:00
Gabriel Mazetto
e7a060321f Moving away from the "extend" based factory to a more traditional one.
Using `extend` dynamically can lead to bad performance as it
invalidates the method's cache.
2017-08-22 06:33:20 +02:00