drizzle-team / drizzle-team/drizzle-orm

[BUG]: `drizzle-kit` not printing actual error messages (`beta.9`)

Open
#5,238 6 comments 8 reactions 0 assignees View on GitHub
1.0.0-beta.* bug
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Report hasn't been filed before.

- [x] I have verified that the bug I'm about to report hasn't been filed before.

### What version of `drizzle-orm` are you using?

1.0.0-beta.9-e89174b

### What version of `drizzle-kit` are you using?

1.0.0-beta.9-e89174b

### Other packages

_No response_

### Describe the Bug

When a migration fails, it prints the failing statement, but doesn't print the actual error message returned from postgres. Here's an example:

```
$ bun run node_modules/.bin/drizzle-kit migrate
No config path provided, using default 'drizzle.config.ts'
Reading config file '/.../drizzle.config.ts'
Using 'pg' driver for database querying
[⣷] applying migrations... Error Failed query: CREATE TABLE append_emode_assets_ltvzero (
"chainId" int,
pool citext NOT NULL,
asset citext NOT NULL,
"categoryId" int NOT NULL,
"ltvzeroEnabled" boolean NOT NULL,
"blockIndex" numeric(18, 8),
"insertedAt" timestamp DEFAULT now() NOT NULL,
CONSTRAINT append_emode_assets_ltvzero_pkey PRIMARY KEY ("chainId", "blockIndex")
) PARTITION BY LIST ("chainId");

params:
error: script "drizzle-kit" exited with code 1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.