diff options
author | Xavier Noria <fxn@hashref.com> | 2013-03-17 20:29:58 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-03-17 20:29:58 +0100 |
commit | 8744632fb5649cf26cdcd1518a3554ece95a401b (patch) | |
tree | a258632b7fa143ca105c08f2d5d71c04fb0f460d /activerecord/CHANGELOG.md | |
parent | b365354e593da172c55770aed22c8211dbc18b08 (diff) | |
download | rails-8744632fb5649cf26cdcd1518a3554ece95a401b.tar.gz rails-8744632fb5649cf26cdcd1518a3554ece95a401b.tar.bz2 rails-8744632fb5649cf26cdcd1518a3554ece95a401b.zip |
sets limit 191 for schema_migrations#version in mysql2 if the encoding is "utf8mb4"
Please, see rationale in the included CHANGELOG patch.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 799a1c1a65..3ef21ab194 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,20 @@ ## Rails 4.0.0 (unreleased) ## +* The length of the `version` column in the `schema_migrations` table + created by the `mysql2` adapter is 191 if the encoding is "utf8mb4". + + The "utf8" encoding in MySQL has support for a maximum of 3 bytes per character, + and only contains characters from the BMP. The recently added + [utf8mb4](http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html) + encoding extends the support to four bytes. As of this writing, said encoding + is supported in the betas of the `mysql2` gem. + + Setting the encoding to "utf8mb4" has + [a few implications](http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-upgrading.html). + This change addresses the max length for indexes, which is 191 instead of 255. + + *Xavier Noria* + * Counter caches on associations will now stay valid when attributes are updated (not just when records are created or destroyed), for example, when calling `update_attributes`. The following code now works: |