Add charset and collation options support for MySQL string and text columns.#17574
Merged
jeremy merged 1 commit intorails:masterfrom Apr 7, 2015
Merged
Add charset and collation options support for MySQL string and text columns.#17574jeremy merged 1 commit intorails:masterfrom
jeremy merged 1 commit intorails:masterfrom
Conversation
919d69d to
2050cde
Compare
Member
There was a problem hiding this comment.
Why are we setting a default charset based on the collation?
Member
Author
There was a problem hiding this comment.
Although I thought charset necessary for specify collation, was not that necessary.
Member
|
👍 to the concept. This is a great way to reduce the size of large indexes on ascii columns. |
35778da to
1070ef1
Compare
1070ef1 to
b038a23
Compare
813d1a2 to
2b2ff83
Compare
f5b2f69 to
a8fc097
Compare
ddc0111 to
23cc2f6
Compare
1c1a187 to
f15532a
Compare
f15532a to
416754e
Compare
731f1a1 to
47ac3ef
Compare
…text columns
Example:
create_table :foos do |t|
t.string :string_utf8_bin, charset: 'utf8', collation: 'utf8_bin'
t.text :text_ascii, charset: 'ascii'
end
47ac3ef to
0aa83f3
Compare
jeremy
added a commit
that referenced
this pull request
Apr 7, 2015
Add charset and collation options support for MySQL string and text columns.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MySQL is possible to specify charset and collation in each column.
This is useful to for a case-sensitive search or specify charset
asciito secret_token column.Index size of string column depends on maxlen of that charset. In the case of strict_mode, it can be in error INSERT of characters that are not included in that charset.