Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support equally named scripts in subfolders #150

Closed
erikbra opened this issue Dec 15, 2021 · 0 comments · Fixed by #151
Closed

Support equally named scripts in subfolders #150

erikbra opened this issue Dec 15, 2021 · 0 comments · Fixed by #151
Assignees

Comments

@erikbra
Copy link
Owner

erikbra commented Dec 15, 2021

("stolen" from chucknorris/roundhouse#444)

Is your feature request related to a problem? Please describe.
When developing with sub-folders under a RH folder (e.g. /Up/tables/table_1, /Up/tables/table_2), if two scripts have the same name (e.g. /Up/tables/table_1/init.sql, /Up/tables/table_2/init.sql), RH will mistakenly overwrite the entry in ScriptsRun with the text/hash from the second file rather than creating a new entry to represent the different file.

As such, the next time RH processes the folders/files, it believes the first instance has changed and re-runs it (updating the ScriptsRun table entry) and then when it finds the second file, runs it again believing it has changed (updating the ScriptsRun table entry) ... rinse, repeat.

Describe the solution you'd like
The subfolders, relative to the parent folder (e.g. 'up', 'sprocs', etc) should be preserved in the ScriptsRun table

@erikbra erikbra linked a pull request Dec 16, 2021 that will close this issue
@erikbra erikbra self-assigned this Dec 16, 2021
erikbra added a commit that referenced this issue Dec 17, 2021
* Rewrote a bit to make sure files are sorted on folder name if subfolders are used in up, sprocs, etc folders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant