This PR add a function to print the exception detail and log it.
It refactors existing code to execute migration related statements within a single method.
Perhaps it would be a good idea to provide an additional function that would execute the SQL statement, print the exception detail and log it. That could be handy for people who want to parallelize migrating indexes.
This PR add a function to print the exception detail and log it. It refactors existing code to execute migration related statements within a single method.
Inspired from post by @laurenz in https://github.com/cybertec-postgresql/db_migrator/issues/26#issuecomment-1644054423