Patch for ActiveRecord 8.1+ which restores pre Rails 8 db:migrate behavior

No pipelines have been run yet.