trabajo-afectivo/db/migrate/20181010000000_setting_add_sipgate_alternative_fqdn.rb

31 lines
801 B
Ruby
Raw Normal View History

class SettingAddSipgateAlternativeFqdn < ActiveRecord::Migration[5.1]
def up
# return if it's a new setup
return if !Setting.exists?(name: 'system_init_done')
Setting.create_if_not_exists(
title: 'sipgate.io alternative fqdn',
name: 'sipgate_alternative_fqdn',
area: 'Integration::Sipgate::Expert',
description: 'Alternative FQDN for callbacks if you operate Zammad in internal network.',
options: {
form: [
{
display: '',
null: false,
name: 'sipgate_alternative_fqdn',
tag: 'input',
},
],
},
state: '',
preferences: {
permission: ['admin.integration'],
},
frontend: false
)
end
end