trabajo-afectivo/db/migrate/20170816000001_idoit_support.rb

52 lines
1.3 KiB
Ruby
Raw Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
2017-09-08 08:28:34 +00:00
class IdoitSupport < ActiveRecord::Migration[4.2]
2017-09-06 06:39:02 +00:00
def up
# return if it's a new setup
return if !Setting.exists?(name: 'system_init_done')
2017-09-06 06:39:02 +00:00
Setting.create_if_not_exists(
title: 'i-doit integration',
name: 'idoit_integration',
area: 'Integration::Switch',
2017-09-06 06:39:02 +00:00
description: 'Defines if i-doit (http://www.i-doit) is enabled or not.',
options: {
2017-09-06 06:39:02 +00:00
form: [
{
display: '',
null: true,
name: 'idoit_integration',
tag: 'boolean',
2017-09-06 06:39:02 +00:00
options: {
true => 'yes',
false => 'no',
},
},
],
},
state: false,
2017-09-06 06:39:02 +00:00
preferences: {
prio: 1,
2017-09-06 06:39:02 +00:00
authentication: true,
permission: ['admin.integration'],
2017-09-06 06:39:02 +00:00
},
frontend: true
2017-09-06 06:39:02 +00:00
)
Setting.create_if_not_exists(
title: 'i-doit config',
name: 'idoit_config',
area: 'Integration::Idoit',
2017-09-06 06:39:02 +00:00
description: 'Defines the i-doit config.',
options: {},
state: {},
2017-09-06 06:39:02 +00:00
preferences: {
prio: 2,
2017-09-06 06:39:02 +00:00
permission: ['admin.integration'],
},
frontend: false,
2017-09-06 06:39:02 +00:00
)
end
end