Closed kraglalbert closed 3 years ago
@kraglalbert just dropped by to say that the one helpful thing I got from the abstract "Error querying the database" message is that it pointed me to this issue, which made me understand our problem and how to fix it. Thanks!
This should be fixed in recent prisma migrate versions. Please open a new issue if it happens with the preview version or later (2.13.1). Thanks for reporting!
Bug description
Today I updated
prisma-cli
from version 2.4.x to the latest version and a migration that previously worked now fails. The migration itself is pretty simple since it's just changing an enum value. Below are the generated files for the migration:steps.json
:README.md
:I'm working with Postgres which allows enum types to be defined. The migrations before this one are applied successfully but this one fails which prevents the migrations after it from being applied as well. Is this a bug or is there something I'm doing wrong on my end?
How to reproduce
schema.prisma
prisma migrate save --experimental
prisma migrate up --experimental
Migration Database actions Status
20201001212409-update-consultation-status-enum statements.
You can get the detailed db changes with prisma migrate up --experimental --verbose Or read about them here: ./migrations/20201001212409-update-consultation-status-enum/README.md
Error: Connector error: Error querying the database: Error querying the database: db error: ERROR: current transaction is aborted, commands ignored until end of transaction block 0: migration_core::api::ApplyMigration with migration_id="20201001212409-update-consultation-status-enum" at migration-engine/core/src/api.rs:93
@prisma/cli : 2.9.0 @prisma/client : 2.4.1 Current platform : darwin Query Engine : query-engine 369b3694b7edb869fad14827a33ad3f3f49bbc20 (at node_modules/@prisma/cli/query-engine-darwin) Migration Engine : migration-engine-cli 369b3694b7edb869fad14827a33ad3f3f49bbc20 (at node_modules/@prisma/cli/migration-engine-darwin) Introspection Engine : introspection-core 369b3694b7edb869fad14827a33ad3f3f49bbc20 (at node_modules/@prisma/cli/introspection-engine-darwin) Format Binary : prisma-fmt 369b3694b7edb869fad14827a33ad3f3f49bbc20 (at node_modules/@prisma/cli/prisma-fmt-darwin) Studio : 0.296.0