#7251·Prisma

Prisma Migrate - Can't add value to enum in Postgres Database

Author: bryanmcgraneCreated May 24, 2021Updated Sep 29, 2026
Labelsbug/2-confirmedkind/bugtech/enginestopic: enumtopic: postgresql

Bug description

I have an enum value and I would like to expand the possible values. The migration file is created successfully, but when running the migration I get the following error:

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

How to reproduce

  1. Create a migration with an enum and run migrate
  2. Add a value to the enum, create a new migration, and try to run migrate
  3. See issue

Fix could be this: https://stackoverflow.com/questions/53149484/error-alter-type-add-cannot-run-inside-a-transaction-block

Expected behavior

An error is not thrown

Prisma information

enum ModelType { TEST_1 TEST_2 TEST_3 }

Environment & setup

Debian (mac) 11.3.1

Prisma Version

2.23.0