Created
April 2, 2013 00:41
-
-
Save rafbm/5289038 to your computer and use it in GitHub Desktop.
ActiveRecord migration for increasing MySQL column length from TEXT to MEDIUMTEXT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IncreaseDelayedJobsHandlerLength < ActiveRecord::Migration | |
def up | |
# Increase to MEDIUMTEXT (16,777,215 bytes) | |
change_column(:delayed_jobs, :handler, :text, limit: 16.megabytes - 1) | |
end | |
def down | |
# Back to default TEXT (65,535 bytes) | |
change_column(:delayed_jobs, :handler, :text) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment