-
Notifications
You must be signed in to change notification settings - Fork 901
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
Fix create_versions
migration to support Ruby3
#1366
Fix create_versions
migration to support Ruby3
#1366
Conversation
9660725
to
47f81bc
Compare
Does this remove compatibility with Ruby 2 in any capacity? |
I am curious why the tests were not failing on ruby 3 before? |
@mathieujobin they weren't failing because the migration still succeeds, however in the t.string "{:null=>false, :limit=>191}" instead of t.string :item_type, null: false, limit: 191 This is due to the fact that Ruby 3 interprets the hash |
Thanks for the contribution. Please add an entry to the changelog under Unreleased -> Fixed. |
@jaredbeck updated the changelog 👍 |
Thanks, Joey |
In existing projects, what do we need to do to get these changes applied retroactively? I've updated the gem to 12.3.0 but am still seeing the mangled schema.rb file after running migrations. |
The
create_versions
migration created by doingbundle exec rails generate paper_trail:install
is not compatible with Ruby3. This PR updates the migration so that it will be compatibleCheck the following boxes:
master
(if not - rebase it).code introduces user-observable changes.
and description in grammatically correct, complete sentences.