anjlab / rails-data-migrations

Run your data migration scripts like a master
MIT License
124 stars 15 forks source link

Broken after updating to Rails 7.1 #16

Closed hernanvicente closed 3 months ago

hernanvicente commented 10 months ago

I recently updated my Rails version to 7.1.1, but I have been experiencing some issues with the create_table method. Specifically, when running ./bin/rails data:migrate, I am seeing the following error:

NoMethodError: undefined method `create_table' for RailsDataMigrations::LogEntry:Class

Tasks: TOP => data:migrate => data:init_migration
(See full trace by running task with --trace)

It seems that in Rails 7.1, ::ActiveRecord::SchemaMigration no longer inherits from ActionRecord::Base. I found a solution to this problem by introducing a monkey-patch, but I would like to create a pull request with the necessary changes to fix the issue. You can find more information about the change in the SchemaMigration here.

hernanvicente commented 10 months ago

Here is the related PR that solves this. I hope it helps.

hernanvicente commented 7 months ago

Hello, is there something I can do to have this merged?

serggl commented 3 months ago

fixed via #17