X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/061d77726666beb8bccc27e0d410c4dc0ee4ef09..38b9f8f7927f09b32a94df87d1264f568f620480:/db/migrate/013_add_email_valid.rb diff --git a/db/migrate/013_add_email_valid.rb b/db/migrate/013_add_email_valid.rb index 2192383bd..a01809701 100644 --- a/db/migrate/013_add_email_valid.rb +++ b/db/migrate/013_add_email_valid.rb @@ -1,7 +1,7 @@ class AddEmailValid < ActiveRecord::Migration def self.up add_column "users", "email_valid", :boolean, :default => false, :null => false - User.update_all(:email_valid => true) + User.update_all("email_valid = (active != 0)") #email_valid is :boolean, but active is :integer. "email_valid = active" (see r11802 or earlier) will fail for stricter dbs than mysql end def self.down