Fix `create_versions` migration to support Ruby3 (#1366)

* Fix `create_versions` migration to support Ruby3

* Update changelog
This commit is contained in:
Joey Tepperman 2022-03-09 17:09:46 -05:00 committed by GitHub
parent 81f935fb79
commit 3b8f55b3d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -42,7 +42,8 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/).
### Fixed
- None
- [#1366](https://github.com/paper-trail-gem/paper_trail/pull/1366) -
Fixed a bug where the `create_versions` migration lead to a broken `db/schema.rb` for Ruby 3
### Dependencies

View File

@ -53,9 +53,9 @@ module PaperTrail
# See https://github.com/paper-trail-gem/paper_trail/issues/651
def item_type_options
if mysql?
", { null: false, limit: 191 }"
", null: false, limit: 191"
else
", { null: false }"
", null: false"
end
end

View File

@ -33,9 +33,9 @@ RSpec.describe PaperTrail::InstallGenerator, type: :generator do
}.call
expected_item_type_options = lambda {
if described_class::MYSQL_ADAPTERS.include?(ActiveRecord::Base.connection.class.name)
", { null: false, limit: 191 }"
", null: false, limit: 191"
else
", { null: false }"
", null: false"
end
}.call
expect(destination_root).to(