You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've been using refinery for a while now and have noticed that it never seems to pick up new files unless we explicitly force a rebuild of the migration binary we use by changing a line in it for example.
I've tested this a few different ways and I do want to say that it does seem to pick up on existing file changes and deletes of files it knows about, but it never picks up on adding new files without forcing a rebuild of the binary
Should be able to minimally reproduce with a quick log of the migrations it knows about
Throwing this in a project with refinery and running it the first time it should properly pick up on all files in the sql folder. However, when I you add a new folder and re-run the binary without touching the other files in the sql folder, touching the src/main.rs, or anything else that would cause an explicit rebuild will show that it doesn't seem to pick up on the new files.
Is there something we are doing obviously wrong here? Does anybody else run into this (we hit in CI constantly and it's causing problems)? Is there a change that could be made to our usage or to the project that would fix this behavior? If not, it could be useful to add a warning in the main README or on docs.rs somewhere.
The text was updated successfully, but these errors were encountered:
Hi, and thanks for the the interest! Yeah with sql migrations makes sense as there isn't a way for the rust compiler to detect those files as they aren't part of the project, thanks for posting a resolution to the problem!
Update:
would you be interested in updating the README.md with this tip for sql migrations?
Hello folks,
We've been using refinery for a while now and have noticed that it never seems to pick up new files unless we explicitly force a rebuild of the migration binary we use by changing a line in it for example.
I've tested this a few different ways and I do want to say that it does seem to pick up on existing file changes and deletes of files it knows about, but it never picks up on adding new files without forcing a rebuild of the binary
Should be able to minimally reproduce with a quick log of the migrations it knows about
Throwing this in a project with refinery and running it the first time it should properly pick up on all files in the sql folder. However, when I you add a new folder and re-run the binary without touching the other files in the sql folder, touching the src/main.rs, or anything else that would cause an explicit rebuild will show that it doesn't seem to pick up on the new files.
Is there something we are doing obviously wrong here? Does anybody else run into this (we hit in CI constantly and it's causing problems)? Is there a change that could be made to our usage or to the project that would fix this behavior? If not, it could be useful to add a warning in the main README or on docs.rs somewhere.
The text was updated successfully, but these errors were encountered: