From 008a6a6ce6fa943adcfecf3a606b845cfa282680 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 14 Mar 2018 14:42:49 +0100 Subject: Route path lookups through legacy_disk_path --- db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb | 2 +- db/migrate/20161220141214_remove_dot_git_from_group_names.rb | 2 +- db/migrate/20161226122833_remove_dot_git_from_usernames.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'db') diff --git a/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb b/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb index bcdae272209..a96ea7d9db4 100644 --- a/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb +++ b/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb @@ -12,7 +12,7 @@ class MigrateProcessCommitWorkerJobs < ActiveRecord::Migration end def repository_storage_path - Gitlab.config.repositories.storages[repository_storage]['path'] + Gitlab.config.repositories.storages[repository_storage].legacy_disk_path end def repository_path diff --git a/db/migrate/20161220141214_remove_dot_git_from_group_names.rb b/db/migrate/20161220141214_remove_dot_git_from_group_names.rb index 8fb1f9d5e73..bddc234db25 100644 --- a/db/migrate/20161220141214_remove_dot_git_from_group_names.rb +++ b/db/migrate/20161220141214_remove_dot_git_from_group_names.rb @@ -60,7 +60,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']]['path'] + Gitlab.config.repositories.storages[row['repository_storage']].legacy_disk_path end.compact # Move the namespace directory in all storages paths used by member projects diff --git a/db/migrate/20161226122833_remove_dot_git_from_usernames.rb b/db/migrate/20161226122833_remove_dot_git_from_usernames.rb index 61dcc8c54f5..7c28d934c29 100644 --- a/db/migrate/20161226122833_remove_dot_git_from_usernames.rb +++ b/db/migrate/20161226122833_remove_dot_git_from_usernames.rb @@ -71,7 +71,7 @@ class RemoveDotGitFromUsernames < ActiveRecord::Migration route_exists = route_exists?(path) Gitlab.config.repositories.storages.each_value do |storage| - if route_exists || path_exists?(path, storage['path']) + if route_exists || path_exists?(path, storage.legacy_disk_path) counter += 1 path = "#{base}#{counter}" @@ -84,7 +84,7 @@ class RemoveDotGitFromUsernames < ActiveRecord::Migration def move_namespace(namespace_id, path_was, path) repository_storage_paths = select_all("SELECT distinct(repository_storage) FROM projects WHERE namespace_id = #{namespace_id}").map do |row| - Gitlab.config.repositories.storages[row['repository_storage']]['path'] + Gitlab.config.repositories.storages[row['repository_storage']].legacy_disk_path end.compact # Move the namespace directory in all storages paths used by member projects -- cgit v1.2.3