Skip to content

Migration failed: "pq: unexpected transaction status idle" when running against CRBD #290

@Hades32

Description

@Hades32

when I run sql-migrate up --env=$SQL_ENV I get every time

Migration failed: pq: unexpected transaction status idle handling 20250929142901-some-migration.sql

The DB we're connecting to is a CockroachDB instance, which should be fully PostgreSQL compatible.

Isn't "idle" exactly the state we expect?

Our db config:

staging:
  dialect: postgres
  datasource: dbname=username sslmode=verify-full host=our-db-host.cockroachlabs.cloud port=26257 user=${CRDB_USER} password=${CRDB_PASSWORD} sslrootcert=staging.crt
  dir: migrations
  table: migrations

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