erikbra / grate

grate - the SQL scripts migration runner
MIT License
209 stars 40 forks source link

GrateScritpsRun everytime i run the tool #544

Closed drhamann closed 5 months ago

drhamann commented 5 months ago

Describe the bug I haved run the first time and everything go fine and create the tables an run the initial scripts. I 'm using this command

dotnet new tool-manifest
dotnet tool install grate
dotnet tool restore
dotnet grate --connectionstring='Data Source=localhost;User=sa;Password=yourStrong(!)Password;Database=grate_test;TrustServerCertificate=True' --silent 

To Reproduce I create a pipeline everytime somene create a script inside a up folder it runs these command again. Run this commands more than once, are executing the base scripts all over again

Expected behavior I expecteded that the Base scripts run just once and not everytime.

Screenshots image image

Desktop (please complete the following information):

erikbra commented 5 months ago

I think this might be a duplicate of #524, do you agree?

And, note, the GrateVersion, GrateScriptsRun, and GrateVersion is only for the internal Grate data structure. The Version, ScriptsRun, and Version are for "your" scripts. However, it's a bug. I suspect it is related to line endings in the embedded scripts in the DLL that creates the internal structure, however, I'm not certain, I haven't had the chance to look at it properly yet

drhamann commented 5 months ago

Yeah, it is the same issue. I will close and comment there.