Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSQLException: ERROR: ALTER TYPE ... ADD cannot run inside a transaction block #119

Open
cammellos opened this issue Jun 12, 2017 · 1 comment

Comments

@cammellos
Copy link

Hi, thanks for the library.

We are having some problems running a migrations,
we are using postgres and trying to alter an ENUM type, but PSQLException: ERROR: ALTER TYPE ... ADD cannot run inside a transaction block is returned.

This is due to the fact that execute! runs the sql statement in a transaction and postgres does not support altering an ENUM in a transaction.

A workaround would be to specify :transactions? false in the execute! statement.

We would be happy to send you a pull request but we might need some suggestion on how you would like us to implement it.

Thanks
Andrea

@chopmo
Copy link
Contributor

chopmo commented Jan 24, 2018

@cammellos I had a go at this - let me know if you have feedback to the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants