I tried placing my custom file in multiple locations inside the lib folder with no success.
I found a PR from 2017 to reactivate this behavior but wasn't merged. https://github.com/rails/rails/pull/13972
I had a look at https://github.com/rails/rails/blob/master/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb#L17
and it looks like it's not implemented, but I don't know if just this file should change.
I´ve found resources on how to do it in older rails versions, but is there any way to override the Rails templates in Rails 6?