Fix migration SQL.

This commit is contained in:
Douwe Maan 2015-03-31 23:42:49 +02:00
parent 175f7f68a6
commit 45ee9009f5
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class RemovePeriodsAtEndsOfUsernames < ActiveRecord::Migration
username = quote_string(username)
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
select_all("SELECT id, path FROM namespaces WHERE type = 'Group' AND path LIKE '%.'").each do |group|