drizzle-team / drizzle-team/drizzle-orm
[BUG]: drizzle-kit push making multiple `DROP CONSTRAINT NOT NULL`'s - PostgreSQL
- 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.44.6
### What version of `drizzle-kit` are you using?
^0.31.5
### Other packages
_No response_
### Describe the Bug
- Database engine: PostgreSQL
- Current setting: backend API server with Nodejs runtime.
- `drizzle-kit push` generated multiple DROP CONSTRAINT NOT NULL on columns even though I made no update to those columns (in all tables). I traced this back to when this occurred and here are some information I recalled;
1. I was working on multiple databases, so as to test between my dev database and my prod one. At first, any update I made to the database, `drizzle-kit push` seemed to work normally as to update those part that I have made changes to.
2. Back to my most recent database, which was stored in a PostgreSQL docker instance on an Azure VM's Linux Ubuntu 24.04, it happened when I was trying to update some pgEnumType data for categorizations on my database, drizzle-kit decided to add multiple drop constraints that seemed to span all the database's tables.
Was there supposed to be something I have to do before getting to push that updates to my database. I really hope you guys can figure out what was wrong with it.
Contributor guide
Assessment
This issue has not been assessed yet.