drizzle-team / drizzle-team/drizzle-orm

[BUG]: `durable-sqlite` Rollback exception hides migration failure exception

Open
#5,763 0 comments 0 reactions 0 assignees View on GitHub
bug bug/fixed-in-beta
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?

0.45.1

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

0.31.8

### Other packages

_No response_

### Describe the Bug

In durable-sqlite/migrator.ts when the migration transaction fails it will rollback and hide the exception with message that caused the issue since rollback works by throwing an exception.

Bit of a headache until you figure this out - logging (or saving this exception somewhere to access later) before rolling back would be very helpful.

I can make a PR to do this if you'd like though it's not immediately obvious to me how to access the logger from migrate.

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.