Fix generation when engines define data migrations path #225
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey there!
There is a bug when having multiple paths defined by engines:
Let's say we have some engines at the
engines
folderIf any engine add a data migration path, when generating a new data migration with
rails g data_migration Something
then it'll join all paths into a monstrosity likedb/data/User/MyUser/path/to/project/engines/engineA/db/data/User/....
This PR adds a new config option which is pretty much similar to the old
data_migrations_path
, except that it is only for setting the generation folder, so while multiple engines might add migrations path, only one migration gen path will existEdit: No further action is required aside from setting the data migrations path. The migrations gen path will have a default value which will behave exactly like before.