-
- Downloads
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.
Showing
- app/models/pool_repository.rb 13 additions, 6 deletionsapp/models/pool_repository.rb
- app/models/storage/hashed_project.rb 5 additions, 3 deletionsapp/models/storage/hashed_project.rb
- db/migrate/20181120082911_rename_repositories_pool_repositories.rb 11 additions, 0 deletions...e/20181120082911_rename_repositories_pool_repositories.rb
- db/migrate/20181123135036_drop_not_null_constraint_pool_repository_disk_path.rb 9 additions, 0 deletions...036_drop_not_null_constraint_pool_repository_disk_path.rb
- db/schema.rb 9 additions, 9 deletionsdb/schema.rb
- lib/tasks/gitlab/cleanup.rake 2 additions, 2 deletionslib/tasks/gitlab/cleanup.rake
- spec/factories/pool_repositories.rb 5 additions, 0 deletionsspec/factories/pool_repositories.rb
- spec/factories/shards.rb 5 additions, 0 deletionsspec/factories/shards.rb
- spec/models/pool_repository_spec.rb 24 additions, 0 deletionsspec/models/pool_repository_spec.rb
spec/factories/pool_repositories.rb
0 → 100644
spec/factories/shards.rb
0 → 100644
spec/models/pool_repository_spec.rb
0 → 100644
Please register or sign in to comment