summaryrefslogtreecommitdiffstats
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20160404080304_force_password_reset_during_setup.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20160404080304_force_password_reset_during_setup.rb b/db/migrate/20160404080304_force_password_reset_during_setup.rb
new file mode 100644
index 000000000..d80057a2c
--- /dev/null
+++ b/db/migrate/20160404080304_force_password_reset_during_setup.rb
@@ -0,0 +1,9 @@
+class ForcePasswordResetDuringSetup < ActiveRecord::Migration
+ 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