-
-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: drizzle-kit migrate doesn't exit 1 on error #2354
Labels
bug
Something isn't working
Comments
This should be fixed in |
Hi I'm still experiencing this issue on Before I upgrade to 0.22.1, this issue doesn't occur, I was at: After upgrading, this issue happened.
|
Hi I'm also experiencing this issue on
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of
drizzle-orm
are you using?0.30.10
What version of
drizzle-kit
are you using?0.21.2
Describe the Bug
When running
drizzle-kit migrate
, if the migration fails, the command does not exit with a non-zero exit code. It exits with code0
. This is critical because if migrations fail, we need a non-zero exit code to stop CI from continuing.In our case, we managed to get the migration to fail when Drizzle attempts to create an index on a column that does not exist. Please note that the error below is not related to this issue.
As a workaround, we use a script that calls
migrate()
and use acatch
to exit 1.Expected behavior
If a migration fails, the command should exit with a non-zero exit code such as
1
.Environment & setup
This issue is reproducible on macOS 14.4.1, Node.js 20.11.0, and using Neon as well as on our GitHub workflow using Ubuntu.
The text was updated successfully, but these errors were encountered: