Merge branch 'fix-migration' into 'master'

Exclude non existent repository storages.

See merge request !8244
This commit is contained in:
Stan Hu 2016-12-22 03:28:44 +00:00
commit 7ab79dff9f

View file

@ -61,7 +61,7 @@ class RemoveDotGitFromGroupNames < ActiveRecord::Migration
def move_namespace(group_id, path_was, path)
repository_storage_paths = select_all("SELECT distinct(repository_storage) FROM projects WHERE namespace_id = #{group_id}").map do |row|
Gitlab.config.repositories.storages[row['repository_storage']]
end
end.compact
# Move the namespace directory in all storages paths used by member projects
repository_storage_paths.each do |repository_storage_path|