Skip to content

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

@cammellos

Description

@cammellos

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions