20161117000001_job_unable_to_create_issue_432.rb 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. class JobUnableToCreateIssue432 < ActiveRecord::Migration
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. ActiveRecord::Migration.change_table :jobs do |t|
  6. t.change :timeplan, :string, limit: 2500
  7. t.change :condition, :text, limit: 500.kilobytes + 1
  8. t.change :perform, :text, limit: 500.kilobytes + 1
  9. end
  10. ActiveRecord::Migration.change_table :triggers do |t|
  11. t.change :condition, :text, limit: 500.kilobytes + 1
  12. t.change :perform, :text, limit: 500.kilobytes + 1
  13. end
  14. ActiveRecord::Migration.change_table :overviews do |t|
  15. t.change :condition, :text, limit: 500.kilobytes + 1
  16. end
  17. ActiveRecord::Migration.change_table :report_profiles do |t|
  18. t.change :condition, :text, limit: 500.kilobytes + 1
  19. end
  20. ActiveRecord::Migration.change_table :slas do |t|
  21. t.change :condition, :text, limit: 500.kilobytes + 1
  22. end
  23. ActiveRecord::Migration.change_table :macros do |t|
  24. t.change :perform, :text, limit: 500.kilobytes + 1
  25. end
  26. ActiveRecord::Migration.change_table :postmaster_filters do |t|
  27. t.change :match, :text, limit: 500.kilobytes + 1
  28. t.change :perform, :text, limit: 500.kilobytes + 1
  29. end
  30. ActiveRecord::Migration.change_table :stats_stores do |t|
  31. t.change :data, :string, limit: 5000
  32. end
  33. Cache.clear
  34. end
  35. end