Backport of fix from rails/rails#5173 #283

Merged
merged 1 commit into from Aug 4, 2012

Projects

None yet

2 participants

@pixeltrix
Contributor

Rather than use the MySQL specific TINYTEXT, MEDIUMTEXT and LONGTEXT
datatypes, Active Record migrations use TEXT(n) where n is the limit
specified by the developer. Unfortunately how MySQL interprets n
depends on the column's encoding so any limit above 5592405 will be
interpreted as a LONGTEXT.

This commit fixes this by interpreting the limit within the adapter
and using the specific MySQL datatype as appropriate.

@pixeltrix pixeltrix Backport of fix from rails/rails#5173
Rather than use the MySQL specific TINYTEXT, MEDIUMTEXT and LONGTEXT
datatypes, Active Record migrations use TEXT(n) where n is the limit
specified by the developer. Unfortunately how MySQL interprets n
depends on the column's encoding so any limit above 5592405 will be
interpreted as a LONGTEXT.

This commit fixes this by interpreting the limit within the adapter
and using the specific MySQL datatype as appropriate.
3105855
@brianmario brianmario merged commit 8896689 into brianmario:0.2.x Aug 4, 2012
@pixeltrix
Contributor

That was quick! I'll be sending another in a couple of minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment