chucknorris / roundhouse

RoundhousE is a Database Migration Utility for .NET using sql files and versioning based on source control

Home Page:http://projectroundhouse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ScriptsRun.script_name - like named scripts in subfolders causes unwanted collision/rerun

SlyW opened this issue · comments

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.

Any chance to add the folder structure to the script_name value?

Hi, @SlyW . No one is actively maintaining RoundhousE at the moment. I was the main maintainer for the last couple of years, but the codebase needed so much love to be able to meet the 2020s, that I gave up, and started anew.

You can read about the discussion leading to creating grate, inspired by RoundhousE, here: #438

grate should be a drop-in replacement for RoundhousE, you can double-check if you have any blockers here: https://erikbra.github.io/grate/migrating-from-roundhouse/

I implemented your feature request in grate, here. You can look through it if you like. I'll leave the PR open to comments a couple of days, but you can expect a new release in a few days.

erikbra/grate#151

I would really recommend moving from RoundhousE to grate, and, if you have some issues that prevent you from migrating, please create an issue in the grate repository :)

Thank you @erikbra - I will be researching the conversion to grate and am excited to see continued development on this efficiency creator.

Lovely. Let me know if you hit any roadblocks migrating!