GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 5dc77d75 authored by James Lopez's avatar James Lopez

refactored migration based on feedback

parent 7b868c61
......@@ -61,7 +61,7 @@ def up
private
def clean_path(project_path)
execute "UPDATE projects SET path = '#{project_path.clean_path}' WHERE id = #{project_path.id}"
execute "UPDATE projects SET path = #{sanitize(project_path.clean_path)} WHERE id = #{project_path.id}"
end
def rename_project_repo(project_path)
......@@ -73,4 +73,8 @@ def rename_project_repo(project_path)
rescue
false
end
def sanitize(value)
ActiveRecord::Base.connection.quote(value)
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment