I seem to have a strange issue with the ordering. I’m using multiple yml files for the databaseChangeLog listing. I want to have a script run before and after all other scripts so for this I have the following setup in 1 yml file
databaseChangeLog: - include: file: CreateTempSproc.sql relativeToChangelogFile: true - include: file: scripts.yml relativeToChangelogFile: true - include: file: DropTempSproc.sql relativeToChangelogFile: true
The scripts.yml file contains a whole load of includes for individual sql files which will use the stored procedure created and dropped either side of it. However, in the change log table I’m seeing the sql files from within this yml executing and then those from the scripts.yml file
Is there a better method to ensure this kind of sequence for executing my scripts?
Why am I doing this?
I’m not a fan of 100s or 1000s of insert scripts and prefer to use a stored procedure to insert the data. I find this a much more maintainable method of inserting data. Imagine a change to the table and having to update all the insert scripts