diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb index 060203fda12..68dd6f9a5b3 100644 --- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb +++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb @@ -145,8 +145,9 @@ module Gitlab yield(path_before_rename, path_after_rename) rescue StandardError => e failed_reverts << rename_info - say "Renaming #{type} from back to #{path_before_rename} failed. "\ - "Review the error and try again by running the `down` action. \n"\ + say "Renaming #{type} from #{path_after_rename} back to "\ + "#{path_before_rename} failed. Review the error and try "\ + "again by running the `down` action. \n"\ "#{e.message}: \n #{e.backtrace.join("\n")}" end end diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb index f85f2d90f02..05b86f32ce2 100644 --- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb +++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb @@ -50,7 +50,7 @@ module Gitlab rename_namespace_dependencies(namespace, current_path, path_before_rename) else - say "Couldn't rename namespace from #{current_path} back to #{path_before_rename} "\ + say "Couldn't rename namespace from #{current_path} back to #{path_before_rename}, "\ "namespace was renamed, or no longer exists at the expected path" end end diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb index 8f00e957f85..75a75f61953 100644 --- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb +++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb @@ -33,12 +33,13 @@ module Gitlab matches_path = MigrationClasses::Route.arel_table[:path].matches(current_path) project = MigrationClasses::Project.joins(:route) .where(matches_path).first + if project perform_rename(project, current_path, path_before_rename) move_project_folders(project, current_path, path_before_rename) else - say "Couldn't rename Project from #{current_path} back to "\ + say "Couldn't rename project from #{current_path} back to "\ "#{path_before_rename}, project was renamed or no longer "\ "exists at the expected path."