Commit 45ee9009 authored by Douwe Maan's avatar Douwe Maan

Fix migration SQL.

parent 175f7f68
...@@ -37,7 +37,7 @@ class RemovePeriodsAtEndsOfUsernames < ActiveRecord::Migration ...@@ -37,7 +37,7 @@ class RemovePeriodsAtEndsOfUsernames < ActiveRecord::Migration
username = quote_string(username) username = quote_string(username)
execute "UPDATE users SET username = '#{username}' WHERE id = #{user["id"]}" execute "UPDATE users SET username = '#{username}' WHERE id = #{user["id"]}"
execute "UPDATE namespaces SET path = '#{username}', name = '#{username}' WHERE type = NULL AND owner_id = #{user["id"]}" execute "UPDATE namespaces SET path = '#{username}', name = '#{username}' WHERE type IS NULL AND owner_id = #{user["id"]}"
end end
select_all("SELECT id, path FROM namespaces WHERE type = 'Group' AND path LIKE '%.'").each do |group| select_all("SELECT id, path FROM namespaces WHERE type = 'Group' AND path LIKE '%.'").each do |group|
......
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