mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
Use the fully-qualified name of the User class. Also, use a bulk UPDATE
instead of one UPDATE per record. git-svn-id: file:///home/svn/framework3/trunk@10348 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
d0ea92d35f
commit
2b891db0e1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user