OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/db/migrate/20191106132533_make_system_...

14 lines
437 B

class MakeSystemUserActive < ActiveRecord::Migration[6.0]
# Remember the integer mapped to previous builtin status
BUILTIN_STATUS ||= 0
def up
Principal.where(status: BUILTIN_STATUS).update_all(status: Principal.statuses[:active])
end
def down
AnonymousUser.update_all(status: BUILTIN_STATUS)
DeletedUser.update_all(status: BUILTIN_STATUS)
SystemUser.update_all(status: Principal.statuses[:locked])
end
end