ilyakatz / data-migrate

Migrate and update data alongside your database structure.
MIT License
1.4k stars 192 forks source link

Gems' database migrations are not being included when running rake db:migrate:with_data from the parent app #305

Closed jeffktan closed 4 months ago

jeffktan commented 5 months ago

Rails rake db:migrate executes the db:load_config task beforehand which sets the migrations path to pick up any gem added db/migrate paths: https://github.com/rails/rails/blob/main/activerecord/lib/active_record/railties/databases.rake#L22-L28 https://github.com/rails/rails/blob/main/activerecord/lib/active_record/railties/databases.rake#L22-L28

This gem needs to do the same here: https://github.com/ilyakatz/data-migrate/blob/main/tasks/databases.rake#L8-L39