From d9dd4d82756b30273a786a6b60461950502574e4 Mon Sep 17 00:00:00 2001 From: Artur Trofimov Date: Fri, 23 Sep 2016 17:27:45 +1000 Subject: [PATCH] fix first migration for compatible with redmine_2fa plugin --- db/migrate/001_add_sms_auth.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/db/migrate/001_add_sms_auth.rb b/db/migrate/001_add_sms_auth.rb index 56f9dda..4aba22d 100644 --- a/db/migrate/001_add_sms_auth.rb +++ b/db/migrate/001_add_sms_auth.rb @@ -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