cybertec-postgresql / db_migrator

Other
21 stars 8 forks source link

New execute_statement() function #32

Closed fljdin closed 1 year ago

fljdin commented 1 year ago

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

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.

fljdin commented 1 year ago

Rebased into #33