bikeshedder / tusker

PostgreSQL migration management tool
The Unlicense
213 stars 17 forks source link

Better error handling/logging, omits SQL and exits #15

Closed alexkreidler closed 2 years ago

alexkreidler commented 2 years ago

This PR improves error handling by omitting irrelevant information like tracebacks and the original SQL (which the user can find in their schema or migrations SQL files on disk).

$ tusker diff migrations schema
Error executing SQL file postgres_init/6_auth.sql: (psycopg2.errors.DuplicateObject) role "web_anon" already exists

when my migrations config is postgres_init/*.sql

Closes #11

Thanks for this great tool!

bikeshedder commented 2 years ago

@alexkreidler Are you going to work on this?

bikeshedder commented 2 years ago

I've adapted your work and made the changes described in the comments.

I've just released tusker 0.4.5 on pypi.org including these changes: https://pypi.org/project/tusker/0.4.5/