diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-01 00:42:49 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-01 00:42:49 +0300 |
commit | 45ee9009f54da2e538bfe4f27d3f9a084fbb39c4 (patch) | |
tree | ebf470cff64fc02a5d847d5bea40442ff68df205 /db/migrate | |
parent | 175f7f68a6c7857523f1d18b184caa8b84fe0ea3 (diff) |
Fix migration SQL.
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20150324133047_remove_periods_at_ends_of_usernames.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20150324133047_remove_periods_at_ends_of_usernames.rb b/db/migrate/20150324133047_remove_periods_at_ends_of_usernames.rb index bd49caef684..7ce53c2a0d6 100644 --- a/db/migrate/20150324133047_remove_periods_at_ends_of_usernames.rb +++ b/db/migrate/20150324133047_remove_periods_at_ends_of_usernames.rb @@ -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| |