20170418000001_validate_agent_limit.rb 506 B

1234567891011121314151617
  1. class ValidateAgentLimit < ActiveRecord::Migration[4.2]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. Setting.create_if_not_exists(
  6. title: 'Set limit of agents',
  7. name: 'system_agent_limit',
  8. area: 'Core::Online',
  9. description: 'Defines the limit of the agents.',
  10. options: {},
  11. state: false,
  12. preferences: { online_service_disable: true },
  13. frontend: false
  14. )
  15. end
  16. end