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)