cofoundry
cofoundry copied to clipboard
AutoUpdate: Run-Once behaviour
It would be good to be able to define auto-update commands that would run once, independently of the version, after all versioned update commands have been completed. The situation I came across was wanting to seed the db with data, which if you were using .NET commands they would need to be run after all other db updates for the command to work correctly.
At the moment I've only ever pinned an update command to a specific verison, but that could break if at some later point we had updates the underlying db and we then wanted to build the db again from scratch.
This might actually be possible to do now by inspecting the versions passed into the factory and dynamically setting the version of the command, but I haven't looked into it, and a clearer explicit options would be preferred.