@@ -2,11 +2,12 @@ class RemoveDotAtomPathEndingOfProjects < ActiveRecord::Migration
includeGitlab::ShellAdapter
classProjectPath
attr_reader:old_path,:id
attr_reader:old_path,:id,:namespace_path
definitialize(old_path,id)
definitialize(old_path,id,namespace_path)
@old_path=old_path
@id=id
@namespace_path=namespace_path
end
defclean_path
...
...
@@ -43,48 +44,27 @@ class RemoveDotAtomPathEndingOfProjects < ActiveRecord::Migration
end
defprojects_with_dot_atom
select_all("SELECT id, path FROM projects WHERE lower(path) LIKE '%.atom'")
select_all("SELECT p.id, p.path, n.path as namespace_path FROM projects p inner join namespaces n on n.id = p.namespace_id WHERE lower(p.path) LIKE '%.atom'")