From 45ee9009f54da2e538bfe4f27d3f9a084fbb39c4 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 31 Mar 2015 23:42:49 +0200 Subject: Fix migration SQL. --- db/migrate/20150324133047_remove_periods_at_ends_of_usernames.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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| -- cgit v1.2.1