diff --git a/data/sql/migrate/20100916151530_require_admin_flag.rb b/data/sql/migrate/20100916151530_require_admin_flag.rb index c813140e0f..942a3db9e3 100644 --- a/data/sql/migrate/20100916151530_require_admin_flag.rb +++ b/data/sql/migrate/20100916151530_require_admin_flag.rb @@ -3,7 +3,7 @@ class RequireAdminFlag < ActiveRecord::Migration # Make the admin flag required. def self.up # update any existing records - User.find_each { |u| u.admin = true if u.admin.nil? } + Msf::DBManager::User.update_all({:admin => true}, {:admin => nil}) change_column :users, :admin, :boolean, :null => false, :default => true end