Merged migrations.

This commit is contained in:
Martin Edenhofer 2016-07-18 13:31:22 +02:00
parent ed0f858566
commit da89815568
13 changed files with 0 additions and 608 deletions

View file

@ -1,14 +0,0 @@
class AppVersion < ActiveRecord::Migration
def up
Setting.create_if_not_exists(
title: 'App Version',
name: 'app_version',
area: 'Core::WebApp',
description: 'Only used for internal, to propagate current web app version to clients.',
options: {},
state: '',
preferences: { online_service_disable: true },
frontend: false
)
end
end

View file

@ -1,6 +0,0 @@
class AddUpdatedByOnlineNotification < ActiveRecord::Migration
def up
return if OnlineNotification.column_names.include?('updated_by_id')
add_column :online_notifications, :updated_by_id, :integer
end
end

View file

@ -1,5 +0,0 @@
class ImprovedActivityMessages < ActiveRecord::Migration
def up
ActivityStream.destroy_all
end
end

View file

@ -1,13 +0,0 @@
class AddProcessEscalationTickets < ActiveRecord::Migration
def up
Scheduler.create_if_not_exists(
name: 'Process escalation tickets',
method: 'Ticket.process_escalation',
period: 60 * 5,
prio: 1,
active: true,
updated_by_id: 1,
created_by_id: 1,
)
end
end

View file

@ -1,6 +0,0 @@
require 'app_version'
class AppVersionForNewMessages < ActiveRecord::Migration
def up
AppVersion.set(true)
end
end

View file

@ -1,59 +0,0 @@
class AddConfigPostmasterFilter < ActiveRecord::Migration
def up
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '0010_postmaster_filter_trusted',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter to remove X-Zammad-Headers from not trusted sources.',
options: {},
state: 'Channel::Filter::Trusted',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '0020_postmaster_filter_auto_response_check',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter to identify auto responses to prevent auto replies from Zammad.',
options: {},
state: 'Channel::Filter::AutoResponseCheck',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '0030_postmaster_filter_out_of_office_check',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter to identify out of office emails for follow up detection and keeping current ticket state.',
options: {},
state: 'Channel::Filter::OutOfOfficeCheck',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '0100_postmaster_filter_follow_up_check',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter to identify follow ups (based on admin settings).',
options: {},
state: 'Channel::Filter::FollowUpCheck',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '0900_postmaster_filter_bounce_check',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter to identify postmaster bounced - to handle it as follow up of origin ticket.',
options: {},
state: 'Channel::Filter::BounceCheck',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '1000_postmaster_filter_database_check',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter for filters managed via admin interface.',
options: {},
state: 'Channel::Filter::Database',
frontend: false
)
end
end

View file

@ -1,152 +0,0 @@
class AddIchingaIntegration < ActiveRecord::Migration
def up
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '0015_postmaster_filter_identify_sender',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter to identify sender user.',
options: {},
state: 'Channel::Filter::IdentifySender',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '0020_postmaster_filter_auto_response_check',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter to identify auto responses to prevent auto replies from Zammad.',
options: {},
state: 'Channel::Filter::AutoResponseCheck',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '0030_postmaster_filter_out_of_office_check',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter to identify out of office emails for follow up detection and keeping current ticket state.',
options: {},
state: 'Channel::Filter::OutOfOfficeCheck',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '0100_postmaster_filter_follow_up_check',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter to identify follow ups (based on admin settings).',
options: {},
state: 'Channel::Filter::FollowUpCheck',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '0900_postmaster_filter_bounce_check',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter to identify postmaster bounced - to handle it as follow up of origin ticket.',
options: {},
state: 'Channel::Filter::BounceCheck',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '1000_postmaster_filter_database_check',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter for filters managed via admin interface.',
options: {},
state: 'Channel::Filter::Database',
frontend: false
)
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '5000_postmaster_filter_icinga',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter for manage Icinga (http://www.icinga.org) emails.',
options: {},
state: 'Channel::Filter::Icinga',
frontend: false
)
Setting.create_if_not_exists(
title: 'Icinga integration',
name: 'icinga_integration',
area: 'Integration::Icinga',
description: 'Define if Icinga (http://www.icinga.org) is enabled or not.',
options: {
form: [
{
display: '',
null: true,
name: 'icinga_integration',
tag: 'boolean',
options: {
true => 'yes',
false => 'no',
},
},
],
},
state: false,
preferences: { prio: 1 },
frontend: false
)
Setting.create_if_not_exists(
title: 'Sender',
name: 'icinga_sender',
area: 'Integration::Icinga',
description: 'Define the sender email address of Icinga emails.',
options: {
form: [
{
display: '',
null: false,
name: 'icinga_sender',
tag: 'input',
},
],
},
state: 'icinga@monitoring.example.com',
frontend: false,
preferences: { prio: 2 },
)
Setting.create_if_not_exists(
title: 'Auto close',
name: 'icinga_auto_close',
area: 'Integration::Icinga',
description: 'Define if tickets should be closed if service is recovered.',
options: {
form: [
{
display: '',
null: true,
name: 'icinga_auto_close',
tag: 'boolean',
options: {
true => 'yes',
false => 'no',
},
},
],
},
state: true,
preferences: { prio: 3 },
frontend: false
)
Setting.create_if_not_exists(
title: 'Auto close state',
name: 'icinga_auto_close_state_id',
area: 'Integration::Icinga',
description: 'Define the ticket state of auto closed tickets.',
options: {
form: [
{
display: '',
null: false,
name: 'icinga_auto_close_state_id',
tag: 'select',
relation: 'TicketState',
},
],
},
state: 4,
preferences: { prio: 4 },
frontend: false
)
end
end

View file

@ -1,98 +0,0 @@
class AddNagiosIntegration < ActiveRecord::Migration
def up
Setting.create_if_not_exists(
title: 'Define postmaster filter.',
name: '5100_postmaster_filter_nagios',
area: 'Postmaster::PreFilter',
description: 'Define postmaster filter for manage Nagios (http://www.nagios.org) emails.',
options: {},
state: 'Channel::Filter::Nagios',
frontend: false
)
Setting.create_if_not_exists(
title: 'Nagios integration',
name: 'nagios_integration',
area: 'Integration::Nagios',
description: 'Define if Nagios (http://www.nagios.org) is enabled or not.',
options: {
form: [
{
display: '',
null: true,
name: 'nagios_integration',
tag: 'boolean',
options: {
true => 'yes',
false => 'no',
},
},
],
},
state: false,
preferences: { prio: 1 },
frontend: false
)
Setting.create_if_not_exists(
title: 'Sender',
name: 'nagios_sender',
area: 'Integration::Nagios',
description: 'Define the sender email address of Nagios emails.',
options: {
form: [
{
display: '',
null: false,
name: 'nagios_sender',
tag: 'input',
},
],
},
state: 'nagios@monitoring.example.com',
frontend: false,
preferences: { prio: 2 },
)
Setting.create_if_not_exists(
title: 'Auto close',
name: 'nagios_auto_close',
area: 'Integration::Nagios',
description: 'Define if tickets should be closed if service is recovered.',
options: {
form: [
{
display: '',
null: true,
name: 'nagios_auto_close',
tag: 'boolean',
options: {
true => 'yes',
false => 'no',
},
},
],
},
state: true,
preferences: { prio: 3 },
frontend: false
)
Setting.create_if_not_exists(
title: 'Auto close state',
name: 'nagios_auto_close_state_id',
area: 'Integration::Nagios',
description: 'Define the ticket state of auto closed tickets.',
options: {
form: [
{
display: '',
null: false,
name: 'nagios_auto_close_state_id',
tag: 'select',
relation: 'TicketState',
},
],
},
state: 4,
preferences: { prio: 4 },
frontend: false
)
end
end

View file

@ -1,144 +0,0 @@
class AddSlackIntegration < ActiveRecord::Migration
def up
Setting.create_or_update(
title: 'Icinga integration',
name: 'icinga_integration',
area: 'Integration::Switch',
description: 'Define if Icinga (http://www.icinga.org) is enabled or not.',
options: {
form: [
{
display: '',
null: true,
name: 'icinga_integration',
tag: 'boolean',
options: {
true => 'yes',
false => 'no',
},
},
],
},
state: false,
preferences: { prio: 1 },
frontend: false
)
Setting.create_or_update(
title: 'Sender',
name: 'icinga_sender',
area: 'Integration::Icinga',
description: 'Define the sender email address of Icinga emails.',
options: {
form: [
{
display: '',
null: false,
name: 'icinga_sender',
tag: 'input',
placeholder: 'icinga@monitoring.example.com',
},
],
},
state: 'icinga@monitoring.example.com',
frontend: false,
preferences: { prio: 2 },
)
Setting.create_or_update(
title: 'Nagios integration',
name: 'nagios_integration',
area: 'Integration::Switch',
description: 'Define if Nagios (http://www.nagios.org) is enabled or not.',
options: {
form: [
{
display: '',
null: true,
name: 'nagios_integration',
tag: 'boolean',
options: {
true => 'yes',
false => 'no',
},
},
],
},
state: false,
preferences: { prio: 1 },
frontend: false
)
Setting.create_or_update(
title: 'Sender',
name: 'nagios_sender',
area: 'Integration::Nagios',
description: 'Define the sender email address of Nagios emails.',
options: {
form: [
{
display: '',
null: false,
name: 'nagios_sender',
tag: 'input',
placeholder: 'nagios@monitoring.example.com',
},
],
},
state: 'nagios@monitoring.example.com',
frontend: false,
preferences: { prio: 2 },
)
Setting.create_or_update(
title: 'Define transaction backend.',
name: '0100_notification',
area: 'Transaction::Backend::Async',
description: 'Define the transaction backend to send agent notifications.',
options: {},
state: 'Transaction::Notification',
frontend: false
)
Setting.create_or_update(
title: 'Define transaction backend.',
name: '6000_slack_webhook',
area: 'Transaction::Backend::Async',
description: 'Define the transaction backend which posts messages to (http://www.slack.com).',
options: {},
state: 'Transaction::Slack',
frontend: false
)
Setting.create_if_not_exists(
title: 'Slack integration',
name: 'slack_integration',
area: 'Integration::Slack',
description: 'Define if Slack (http://www.slack.org) is enabled or not.',
options: {
form: [
{
display: '',
null: true,
name: 'slack_integration',
tag: 'boolean',
options: {
true => 'yes',
false => 'no',
},
},
],
},
state: true,
preferences: { prio: 1 },
frontend: false
)
Setting.create_or_update(
title: 'Slack config',
name: 'slack_config',
area: 'Integration::Slack',
description: 'Define the slack config.',
options: {},
state: {
items: []
},
frontend: false,
preferences: { prio: 2 },
)
end
end

View file

@ -1,37 +0,0 @@
class AddSipgateIntegration < ActiveRecord::Migration
def up
Setting.create_if_not_exists(
title: 'sipgate.io integration',
name: 'sipgate_integration',
area: 'Integration::Switch',
description: 'Define if sipgate.io (http://www.sipgate.io) is enabled or not.',
options: {
form: [
{
display: '',
null: true,
name: 'sipgate_integration',
tag: 'boolean',
options: {
true => 'yes',
false => 'no',
},
},
],
},
state: false,
preferences: { prio: 1 },
frontend: false
)
Setting.create_if_not_exists(
title: 'sipgate.io config',
name: 'sipgate_config',
area: 'Integration::Sipgate',
description: 'Define the sipgate.io config.',
options: {},
state: {},
frontend: false,
preferences: { prio: 2 },
)
end
end

View file

@ -1,13 +0,0 @@
class UpdateSignatureDetection < ActiveRecord::Migration
def up
Setting.create_if_not_exists(
title: 'Define transaction backend.',
name: '1000_signature_detection',
area: 'Transaction::Backend::Async',
description: 'Define the transaction backend to detect customers signature in email.',
options: {},
state: 'Transaction::SignatureDetection',
frontend: false
)
end
end

View file

@ -1,46 +0,0 @@
class AddClearbitIntegration < ActiveRecord::Migration
def up
Setting.create_if_not_exists(
title: 'Clearbit integration',
name: 'clearbit_integration',
area: 'Integration::Switch',
description: 'Define if Clearbit (http://www.clearbit.com) is enabled or not.',
options: {
form: [
{
display: '',
null: true,
name: 'clearbit_integration',
tag: 'boolean',
options: {
true => 'yes',
false => 'no',
},
},
],
},
state: false,
preferences: { prio: 1 },
frontend: false
)
Setting.create_if_not_exists(
title: 'Clearbit config',
name: 'clearbit_config',
area: 'Integration::Clearbit',
description: 'Define the Clearbit config.',
options: {},
state: {},
frontend: false,
preferences: { prio: 2 },
)
Setting.create_if_not_exists(
title: 'Define transaction backend.',
name: '9000_clearbit_enrichment',
area: 'Transaction::Backend::Async',
description: 'Define the transaction backend which will enrich customer and organization informations from (http://www.clearbit.com).',
options: {},
state: 'Transaction::ClearbitEnrichment',
frontend: false
)
end
end

View file

@ -1,15 +0,0 @@
class UpdateCti < ActiveRecord::Migration
def up
setting = Setting.find_by(name: 'sipgate_integration')
if setting
setting.preferences = { prio: 1, trigger: 'cti:reload' }
setting.save
end
setting = Setting.find_by(name: 'chat')
if setting
setting.preferences = { trigger: ['menu:render', 'chat:rerender'] }
setting.save
end
end
end