migrate
migrate copied to clipboard
Allow running Golang based post migration steps
This is an alternative approach to https://github.com/golang-migrate/migrate/pull/932. Often more complex data migrations cannot be fully expressed in SQL alone.
This PR introduces the ability to run a Golang based callback directly after a SQL based migration step was executed (and before the version is updated from dirty to clean in the migration table).
The new feature can be seen in action here: https://github.com/lightninglabs/taproot-assets/pull/1198/commits/1b9a8cc8a1fceaf4e52e6bc3b08264957c185809
coverage: 56.396% (+0.08%) from 56.319% when pulling 1cd7568131cfd5f77a49c046a1e1cdfb476b5bb2 on guggero:post-migrate-exec into 9023d66a0b649dbd6c99950903ebc7fd90d77ded on golang-migrate:master.
We went with our own fork since this repository doesn't seem to be maintained anymore.