How to override `rails generate migration` template

Hey!

There’s some chatter over question but the answers seem outdated and all over the place. I also couldn’t get anything out there working.

Is this possible at the moment?

some of the chatter

  • Here’s the most recent question I’ve seen (and Rails 6 specific) with 2 answers. No chosen correct answer, and one comment that says it doesn’t work
  • Here’s an old question but with a workaround. I haven’t tried it, as it’s not “complete” enough for me since I can’t change the command, but it’s part of the literature.
  • this closed PR is trying to solve another problem but mentions a solution of putting a template at <myproject>/lib/templates/active_record/migration/create_table_migration.rb but it’s not working for me.