Skip to content

Commit

Permalink
fix first migration for compatible with redmine_2fa plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
arturtr committed Sep 23, 2016
1 parent 54def94 commit d9dd4d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion db/migrate/001_add_sms_auth.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
class AddSmsAuth < ActiveRecord::Migration
def up
AuthSourceSms.create name: 'SMS', :onthefly_register => false, :tls => false
AuthSourceSms.create name: 'SMS', onthefly_register: false, tls: false
end

def down
AuthSource.where(type: 'AuthSourceSms').destroy_all
if Redmine::Plugin.installed?(:redmine_2fa)
Redmine2FA::AuthSourceSms.create name: 'SMS', onthefly_register: false, tls: false
end
end
end

0 comments on commit d9dd4d8

Please sign in to comment.