data-migrate
data-migrate copied to clipboard
9.3.0 incompatible with Rails < 7
It looks like db_configs_with_versions
was only introduced in Rails 7 here but is in use by the recently released 9.3.0
Seeing:
NoMethodError undefined method `db_configs_with_versions' for module primary
at block (3 levels) in <top (required)>(/home/ruby/bundle/ruby/3.3.0/gems/data_migrate-9.3.0/tasks/databases.rake:14)
Thanks for reporting! We'll take a look
@toby-brilliant can you give https://github.com/ilyakatz/data-migrate/pull/303 a try?
I get:
NameError: uninitialized constant DataMigrate::ActiveRecordDatabaseTasks (NameError)
schema_mapped_versions = DataMigrate::ActiveRecordDatabaseTasks.db_configs_with_versions
with
GIT
remote: https://github.com/ilyakatz/data-migrate.git
revision: 688316801f2f04eb53ed5165c9014f6370653a8c
branch: fix-rails-6
specs:
data_migrate (9.3.0)
activerecord (>= 6.1)
railties (>= 6.1)
Maybe missing a
require File.join(File.dirname(__FILE__), "data_migrate", "active_record_database_tasks")
Yup. I’ll have more time to work on this tomorrow.
With the require added and the "repond" typo fixed I get:
NoMethodError: undefined method `with_temporary_pool_for_each' for module primary (NoMethodError)
with_temporary_pool_for_each do |pool|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Did you mean? with_temporary_connection_for_each
<internal:kernel>:187:in `loop'
Also ran into this :) ty for catching
Is this already fixed?
I think this is fixed after 11.0.0rc3. I will close this issue in a few days.
Fixed with 11.0.0 (I think). Let me know if not and we'll reopen
It does not appear to be fixed with 11. See https://github.com/ilyakatz/data-migrate/issues/295 and my own experience:
NoMethodError: undefined method `db_configs_with_versions' for module primary
migrate_with_data(/home/ruby/bundle/ruby/3.3.0/gems/data_migrate-11.0.0/lib/data_migrate/database_tasks.rb:187)
block (3 levels) in <top (required)>(/home/ruby/bundle/ruby/3.3.0/gems/data_migrate-11.0.0/tasks/databases.rake:9)
block in execute(/home/ruby/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281)
each(/home/ruby/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281)
...
Reopened it is! Thank you!