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

MySQL: Fix schema dumping `enum` and `set` columns correctly #36604

Merged
merged 1 commit into from Jul 6, 2019

Conversation

Projects
None yet
2 participants
@kamipo
Copy link
Member

commented Jul 5, 2019

enum and set are typed cast as :string, but currently the
:string type is incorrectly reused for schema dumping.

A cast type on columns is not always the same with sql_type, this
fixes schema dumping enum and set columns to use sql_type instead
of type correctly.

MySQL: Fix schema dumping `enum` and `set` columns correctly
`enum` and `set` are typed cast as `:string`, but currently the
`:string` type is incorrectly reused for schema dumping.

A cast type on columns is not always the same with `sql_type`, this
fixes schema dumping `enum` and `set` columns to use `sql_type` instead
of `type` correctly.

@rails-bot rails-bot bot added the activerecord label Jul 5, 2019

@kamipo kamipo merged commit a05a9b0 into rails:master Jul 6, 2019

2 checks passed

buildkite/rails Build #62031 passed (9 minutes, 3 seconds)
Details
codeclimate All good!
Details

@kamipo kamipo deleted the kamipo:fix_schema_dumping_enum branch Jul 6, 2019

kamipo added a commit that referenced this pull request Jul 8, 2019

Merge pull request #36604 from kamipo/fix_schema_dumping_enum
MySQL: Fix schema dumping `enum` and `set` columns correctly
@dudo

This comment has been minimized.

Copy link

commented Jul 9, 2019

Any hope of a similar fix for Postgres?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.