20150715000001_update_services.rb 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. class UpdateServices < ActiveRecord::Migration
  2. def up
  3. Setting.create_or_update(
  4. title: 'Image Service',
  5. name: 'image_backend',
  6. area: 'System::Services',
  7. description: 'Defines the backend for user and organization image lookups.',
  8. options: {
  9. form: [
  10. {
  11. display: '',
  12. null: true,
  13. name: 'image_backend',
  14. tag: 'select',
  15. options: {
  16. '' => '-',
  17. 'Service::Image::Zammad' => 'Zammad Image Service',
  18. },
  19. },
  20. ],
  21. },
  22. state: 'Service::Image::Zammad',
  23. preferences: { prio: 1 },
  24. frontend: false
  25. )
  26. Setting.create_or_update(
  27. title: 'Geo IP Service',
  28. name: 'geo_ip_backend',
  29. area: 'System::Services',
  30. description: 'Defines the backend for geo IP lookups. Show also location of an IP address if an IP address is shown.',
  31. options: {
  32. form: [
  33. {
  34. display: '',
  35. null: true,
  36. name: 'geo_ip_backend',
  37. tag: 'select',
  38. options: {
  39. '' => '-',
  40. 'Service::GeoIp::Zammad' => 'Zammad GeoIP Service',
  41. },
  42. },
  43. ],
  44. },
  45. state: 'Service::GeoIp::Zammad',
  46. preferences: { prio: 2 },
  47. frontend: false
  48. )
  49. Setting.create_or_update(
  50. title: 'Geo Location Service',
  51. name: 'geo_location_backend',
  52. area: 'System::Services',
  53. description: 'Defines the backend for geo location lookups to store geo locations for addresses.',
  54. options: {
  55. form: [
  56. {
  57. display: '',
  58. null: true,
  59. name: 'geo_location_backend',
  60. tag: 'select',
  61. options: {
  62. '' => '-',
  63. 'Service::GeoLocation::Gmaps' => 'Google Maps',
  64. },
  65. },
  66. ],
  67. },
  68. state: 'Service::GeoLocation::Gmaps',
  69. preferences: { prio: 3 },
  70. frontend: false
  71. )
  72. end
  73. end