summaryrefslogtreecommitdiffstats
path: root/db/migrate/20160404080304_force_password_reset_during_setup.rb
blob: 00d3a65a5180b114d02b2862a55c8a3cb717838f (plain)
1
2
3
4
5
6
7
8
9
class ForcePasswordResetDuringSetup < ActiveRecord::Migration[4.2]
  def up
    User.where(login: "admin", last_login_on: nil).update_all(must_change_passwd: true)
  end

  def down
    User.where(login: "admin", last_login_on: nil, must_change_passwd: true).update_all(must_change_passwd: false)
  end
end