Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed an issue where tinyint could not be mapped to boolean in MySQL 8.0.19 #38700

Closed

Conversation

seiyeah78
Copy link

Summary

  • When using MySQL 8.0.19, tinyint is not mapping to boolean throuth ActiveRecord
  • This is probably due to the following changes.

Other Information

cited from https://mysqlserverteam.com/the-mysql-8-0-19-maintenance-release-is-generally-available/

Remove integer display width from SHOW CREATE output (WL#13528) This work by Jon Olav Hauglid changes SHOW CREATE to not output integer display width unless ZEROFILL is also used. Without ZEROFILL, integer display width has no effect. This work is a logical consequence of deprecating the display width attribute for integer types (WL#13127).

@@ -76,7 +76,6 @@ def test_float_types
def test_integer_types
assert_lookup_type :integer, "integer"
assert_lookup_type :integer, "INTEGER"
assert_lookup_type :integer, "tinyint"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will cause TINYINT columns with a display width greater than 1 to be interpreted as boolean attributes instead of integers. I think it will need to be a new framework default to avoid breaking existing applications:

https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt

@rails-bot
Copy link

rails-bot bot commented Jun 9, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.

@rails-bot rails-bot bot added the stale label Jun 9, 2020
@rails-bot rails-bot bot closed this Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants