Merged some migrations.
This commit is contained in:
parent
d8001f3c17
commit
ab53bbc3a7
8 changed files with 18 additions and 177 deletions
|
@ -1,34 +0,0 @@
|
|||
class UpdateTicketNumber < ActiveRecord::Migration
|
||||
def up
|
||||
Setting.create_or_update(
|
||||
title: 'Ticket Number Format',
|
||||
name: 'ticket_number',
|
||||
area: 'Ticket::Number',
|
||||
description: 'Selects the ticket number generator module. "Increment" increments the ticket
|
||||
number, the SystemID and the counter are used with SystemID.Counter format (e.g. 1010138, 1010139).
|
||||
With "Date" the ticket numbers will be generated by the current date, the SystemID and the counter.
|
||||
The format looks like Year.Month.Day.SystemID.counter (e.g. 201206231010138, 201206231010139).
|
||||
With param "Checksum => true" the counter will be appended as checksum to the string. The format
|
||||
looks like SystemID.Counter.CheckSum (e. g. 10101384, 10101392) or Year.Month.Day.SystemID.Counter.CheckSum (e.g. 2012070110101520, 2012070110101535).',
|
||||
options: {
|
||||
form: [
|
||||
{
|
||||
display: '',
|
||||
null: true,
|
||||
name: 'ticket_number',
|
||||
tag: 'select',
|
||||
options: {
|
||||
'Ticket::Number::Increment' => 'Increment (SystemID.Counter)',
|
||||
'Ticket::Number::Date' => 'Date (Year.Month.Day.SystemID.Counter)',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
state: 'Ticket::Number::Increment',
|
||||
frontend: false
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -1,53 +0,0 @@
|
|||
class UpdateAuth < ActiveRecord::Migration
|
||||
def up
|
||||
Setting.create_or_update(
|
||||
title: 'Authentication via OTRS',
|
||||
name: 'auth_otrs',
|
||||
area: 'Security::Authentication',
|
||||
description: 'Enables user authentication via OTRS.',
|
||||
state: {
|
||||
adapter: 'Auth::Otrs',
|
||||
required_group_ro: 'stats',
|
||||
group_rw_role_map: {
|
||||
'admin' => 'Admin',
|
||||
'stats' => 'Report',
|
||||
},
|
||||
group_ro_role_map: {
|
||||
'stats' => 'Report',
|
||||
},
|
||||
always_role: {
|
||||
'Agent' => true,
|
||||
},
|
||||
},
|
||||
frontend: false
|
||||
)
|
||||
Setting.create_or_update(
|
||||
title: 'Authentication via LDAP',
|
||||
name: 'auth_ldap',
|
||||
area: 'Security::Authentication',
|
||||
description: 'Enables user authentication via LDAP.',
|
||||
state: {
|
||||
adapter: 'Auth::Ldap',
|
||||
host: 'localhost',
|
||||
port: 389,
|
||||
bind_dn: 'cn=Manager,dc=example,dc=org',
|
||||
bind_pw: 'example',
|
||||
uid: 'mail',
|
||||
base: 'dc=example,dc=org',
|
||||
always_filter: '',
|
||||
always_roles: %w(Admin Agent),
|
||||
always_groups: ['Users'],
|
||||
sync_params: {
|
||||
firstname: 'sn',
|
||||
lastname: 'givenName',
|
||||
email: 'mail',
|
||||
login: 'mail',
|
||||
},
|
||||
},
|
||||
frontend: false
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -1,51 +0,0 @@
|
|||
class UpdateSetting1 < ActiveRecord::Migration
|
||||
def up
|
||||
Setting.create_if_not_exists(
|
||||
title: 'Send client stats',
|
||||
name: 'ui_send_client_stats',
|
||||
area: 'System::UI',
|
||||
description: 'Send client stats to central server.',
|
||||
options: {
|
||||
form: [
|
||||
{
|
||||
display: '',
|
||||
null: true,
|
||||
name: 'ui_send_client_stats',
|
||||
tag: 'boolean',
|
||||
options: {
|
||||
true => 'yes',
|
||||
false => 'no',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
state: true,
|
||||
frontend: true
|
||||
)
|
||||
Setting.create_if_not_exists(
|
||||
title: 'Client storage',
|
||||
name: 'ui_client_storage',
|
||||
area: 'System::UI',
|
||||
description: 'Use client storage to cache data to perform speed of application.',
|
||||
options: {
|
||||
form: [
|
||||
{
|
||||
display: '',
|
||||
null: true,
|
||||
name: 'ui_client_storage',
|
||||
tag: 'boolean',
|
||||
options: {
|
||||
true => 'yes',
|
||||
false => 'no',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
state: false,
|
||||
frontend: true
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class UpdateTicketArticleSize < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :ticket_articles, :body, :text, limit: 4.megabytes + 1
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -18,6 +18,15 @@ class UpdateSetting2 < ActiveRecord::Migration
|
|||
state: 'logo.svg',
|
||||
frontend: true
|
||||
)
|
||||
Setting.create_if_not_exists(
|
||||
title: 'Online Service',
|
||||
name: 'system_online_service',
|
||||
area: 'Core',
|
||||
description: 'Defines if application is used as online service.',
|
||||
options: {},
|
||||
state: false,
|
||||
frontend: true
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
class UpdateSetting3 < ActiveRecord::Migration
|
||||
def up
|
||||
Setting.create_if_not_exists(
|
||||
title: 'Online Service',
|
||||
name: 'system_online_service',
|
||||
area: 'Core',
|
||||
description: 'Defines if application is used as online service.',
|
||||
options: {},
|
||||
state: false,
|
||||
frontend: true
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -20,5 +20,14 @@ class AddCleanup < ActiveRecord::Migration
|
|||
updated_by_id: 1,
|
||||
created_by_id: 1,
|
||||
)
|
||||
Scheduler.create_or_update(
|
||||
name: 'Delete old entries.',
|
||||
method: 'RecentView.cleanup',
|
||||
period: 1.day,
|
||||
prio: 2,
|
||||
active: true,
|
||||
updated_by_id: 1,
|
||||
created_by_id: 1,
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
class AddCleanup2 < ActiveRecord::Migration
|
||||
def up
|
||||
|
||||
# delete old entries
|
||||
Scheduler.create_or_update(
|
||||
name: 'Delete old entries.',
|
||||
method: 'RecentView.cleanup',
|
||||
period: 1.day,
|
||||
prio: 2,
|
||||
active: true,
|
||||
updated_by_id: 1,
|
||||
created_by_id: 1,
|
||||
)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue