vso-agent-tasks icon indicating copy to clipboard operation
vso-agent-tasks copied to clipboard

DbUpMigration - Difference in journal scriptfile name

Open jorismathijssen opened this issue 5 years ago • 2 comments

Hello there,

I'm having a problem with this task and manually running DBup. The scriptnames when using subdirectory in dbup is different than the scriptnames used by this task.

Is there a way to solve this? Maybe in the DBup script so they both use '.' or '/'.

Manually running DBup 4.2.0: "1. CreateDB.201901311500_LocationIcon.sql" This task: "1. CreateDB\201901311500_LocationIcon.sql"

You can see the replace happen here: https://github.com/DbUp/DbUp/blob/976d91cd5e4bc7c478f172e91b597dd1495274de/src/dbup-core/Engine/SqlScript.cs#L102

jorismathijssen avatar Apr 17 '19 07:04 jorismathijssen

The reason for this is that I implemented sub-directory support before it was released in DbUp.

I think that it would be great if I could just switch from \ to ., but that would essentially break everyone's release-pipelines.

Perhaps we could introduce a DirectorySeparatorChar-input parameter and set that to default to \. Then in the next mayor version, we can change that default value to ..

If you would like this to be implemented in a hurry please feel free to send a pull request.

Anyhow, thank you for bringing this to my attention!

johanclasson avatar Apr 17 '19 08:04 johanclasson

I will take a dive into the code probably tonight

jorismathijssen avatar Apr 17 '19 09:04 jorismathijssen