20160501000001_update_transaction.rb 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. class UpdateTransaction < ActiveRecord::Migration
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. Setting.create_or_update(
  6. title: 'Define sync transaction backend.',
  7. name: '0100_trigger',
  8. area: 'Transaction::Backend::Sync',
  9. description: 'Define the transaction backend to execute triggers.',
  10. options: {},
  11. state: 'Transaction::Trigger',
  12. frontend: false
  13. )
  14. Setting.create_or_update(
  15. title: 'Define transaction backend.',
  16. name: '0100_notification',
  17. area: 'Transaction::Backend::Async',
  18. description: 'Define the transaction backend to send agent notifications.',
  19. options: {},
  20. state: 'Transaction::Notification',
  21. frontend: false
  22. )
  23. Setting.create_or_update(
  24. title: 'Define transaction backend.',
  25. name: '1000_signature_detection',
  26. area: 'Transaction::Backend::Async',
  27. description: 'Define the transaction backend to detect customers signature in email.',
  28. options: {},
  29. state: 'Transaction::SignatureDetection',
  30. frontend: false
  31. )
  32. Setting.create_or_update(
  33. title: 'Define transaction backend.',
  34. name: '6000_slack_webhook',
  35. area: 'Transaction::Backend::Async',
  36. description: 'Define the transaction backend which posts messages to (http://www.slack.com).',
  37. options: {},
  38. state: 'Transaction::Slack',
  39. frontend: false
  40. )
  41. Setting.create_or_update(
  42. title: 'Define transaction backend.',
  43. name: '9000_clearbit_enrichment',
  44. area: 'Transaction::Backend::Async',
  45. description: 'Define the transaction backend which will enrich customer and organization informations from (http://www.clearbit.com).',
  46. options: {},
  47. state: 'Transaction::ClearbitEnrichment',
  48. frontend: false
  49. )
  50. Setting.create_or_update(
  51. title: 'Define transaction backend.',
  52. name: '9100_cti_caller_id_detection',
  53. area: 'Transaction::Backend::Async',
  54. description: 'Define the transaction backend which detects caller ids in objects and store them for cti lookups.',
  55. options: {},
  56. state: 'Transaction::CtiCallerIdDetection',
  57. frontend: false
  58. )
  59. end
  60. end