16 lines
363 B
Ruby
Executable File
16 lines
363 B
Ruby
Executable File
class RequireAdminFlag < ActiveRecord::Migration
|
|
|
|
# Make the admin flag required.
|
|
def self.up
|
|
# update any existing records
|
|
Msf::DBManager::User.update_all({:admin => true}, {:admin => nil})
|
|
|
|
change_column :users, :admin, :boolean, :null => false, :default => true
|
|
end
|
|
|
|
def self.down
|
|
change_column :users, :admin, :boolean, :default => true
|
|
end
|
|
|
|
end
|