20170714000003_cleanup_cti_log.rb 416 B

123456789101112131415161718
  1. class CleanupCtiLog < 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. Scheduler.create_if_not_exists(
  6. name: 'Cleanup Cti::Log',
  7. method: 'Cti::Log.cleanup',
  8. period: 1.month,
  9. prio: 2,
  10. active: true,
  11. updated_by_id: 1,
  12. created_by_id: 1,
  13. )
  14. end
  15. end