20200419204445_setting_websocket_backend.rb 635 B

1234567891011121314151617
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. class SettingWebsocketBackend < ActiveRecord::Migration[5.2]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. Setting.create_if_not_exists(
  7. title: 'Websocket backend',
  8. name: 'websocket_backend',
  9. area: 'System::WebSocket',
  10. description: 'Defines how to reach websocket server. "websocket" is default on production, "websocketPort" is for CI',
  11. state: Rails.env.production? ? 'websocket' : 'websocketPort',
  12. frontend: true
  13. )
  14. end
  15. end