12345678910111213141516171819 |
- # Increase handler size to 16MB (consistent with events.payload)
- class ChangeHandlerToMediumText < ActiveRecord::Migration
- def up
- if mysql?
- change_column :delayed_jobs, :handler, :text, :limit => 16777215
- end
- end
- def down
- if mysql?
- change_column :delayed_jobs, :handler, :text, :limit => 65535
- end
- end
- def mysql?
- ActiveRecord::Base.connection.adapter_name =~ /mysql/i
- end
- end
|