Skip to content

Postgres can add values to enum inside transactions #585

@jakajancar

Description

@jakajancar

The readme says:

transaction

transaction is useful if you need to run some SQL which cannot be executed from within a transaction. For example, in Postgres, you would need to disable transactions for migrations that alter an enum type to add a value

I was surprised to read this, as it hasn't been my experience. Turns out adding enum values has worked within transactions since v12 (released 2019).

Might want to add a note that this only applies to super old versions of PG or come up with an example where it's still relevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions