Class: Gitlab::Database::RenameReservedPathsMigration::V1::MigrationClasses::Project
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Gitlab::Database::RenameReservedPathsMigration::V1::MigrationClasses::Project
- Includes:
- Routable
- Defined in:
- lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb
Constant Summary collapse
- HASHED_STORAGE_FEATURES =
{ repository: 1, attachments: 2 }.freeze
Class Method Summary collapse
-
.name ⇒ Object
Overridden to have the correct ‘source_type` for the `route` relation.
Instance Method Summary collapse
Methods included from Routable
#build_full_path, #full_path, #prepare_route, #update_route
Class Method Details
.name ⇒ Object
Overridden to have the correct ‘source_type` for the `route` relation
84 85 86 |
# File 'lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb', line 84 def self.name 'Project' end |
Instance Method Details
#hashed_storage?(feature) ⇒ Boolean
88 89 90 91 92 93 |
# File 'lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb', line 88 def hashed_storage?(feature) raise ArgumentError, "Invalid feature" unless HASHED_STORAGE_FEATURES.include?(feature) return false unless respond_to?(:storage_version) self.storage_version && self.storage_version >= HASHED_STORAGE_FEATURES[feature] end |