GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Currently when performing sql queries that cannot be run in transaction in migrations, like create index concurrently in postgresql, error message is not very meaningful. This is my try on adding better hint to make life of RoR newbies little bit easier.
create index concurrently
This is marked as WIP for 2 reasons:
I would appreciate any help on this ❤️.
Currently this looks like:
Meaningful info on PG::ActiveSqlTransaction error [WIP]
This commit puts information about disable_ddl_transaction! method
when PG::ActiveSqlTransaction expception is raised while running
I'm certainly in favour of raising a more specific exception... but if we want to provide migrations-specific advice on how to handle it, I think we should either be wrapping it, or just injecting extra info into the existing exception's message.
This blind puts seems out of place, even before we introduce ANSI escapes.
@matthewd thanks for the comment! The problem is I couldn't figure out, how to inject this and I need help with this - this is rather basic concept then intended implementation.
As far as I remember architecture of exceptions handling in adapters makes it really hard or even impossible to write this easily (at least from what I have found).
@matthewd do you have any suggestions on this? :)