railsadminteam / rails_admin

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data
MIT License
7.87k stars 2.25k forks source link

Migrate content from history adapter to paper_trail #3617

Closed RyanTG closed 1 year ago

RyanTG commented 1 year ago

Describe the bug/issue

We have been using the history initializer to track history since like 2011. We are currently upgrading Rails from 6.x to 7.x and Rails_Admin from 2.2.1 to 3.1.2. The 3.0 release removed the history adapter.

When I try to use the history adapter, I get:

NoMethodError (undefined method `new' for nil:NilClass

            @auditing_adapter = klass.new(*([self] + args).compact, &block)
                                     ^^^^):

But sure, it's removed now. Gotta use PaperTrail. However, it seems that shifting to PaperTrail = losing all our history and having to start over.

Reproduction steps

Upgrade from 2.x to 3.x

Expected behavior

We were hoping to not lose our entirely history.

Is there any way to migrate our content from history to papertrail? Or... keep using the history adapter?

Additional context

Thank you!

RyanTG commented 1 year ago

I am closing. I feel like I should have made this a Discussion instead. Sorry. Plus I'm starting to accept this nuclear option.

Also, my guess is that I need to further configure paper_trail, but so far I like it a lot less than history.