20180611070839_add_ux_flow_next_up_to_macros.rb 544 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class AddUxFlowNextUpToMacros < ActiveRecord::Migration[5.1]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. add_column :macros, :ux_flow_next_up, :string, default: 'none', null: false
  7. Macro.connection.schema_cache.clear!
  8. Macro.reset_column_information
  9. macro = Macro.find_by(name: 'Close & Tag as Spam')
  10. return if !macro
  11. macro.ux_flow_next_up = 'next_task'
  12. macro.save!
  13. end
  14. end