[BUG]: Check constraint are not being generated for postgres.
Problem
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.36.1 What version of `drizzle-kit` are you using? 0.28.0 Other packages _No response_ Describe the Bug Check constraints are not being generated when using drizzle with postgress. Respective docs: https://orm.drizzle.team/docs/indexes-constraints#check Schema: [code block] Using `npx drizzle-kit generate`. Generated SQL, does not contain score constraint: [code block] (The tables use the prefix "pandorasdb")
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: [BUG]: Check constraint are not being generated for postgres.
Searching through the issues, I found a user who configured the database directly in Postgres and used `npx drizzle-kit pull` to bring the configurations to the schemas. I configured my schemas based on this return and now everything is working. In my case, I needed to create multiple checks and I wasn't able to do it before. I believe that a lot has already been resolved, however, the documenta
Trust Score
4 verifications
- 1
Searching through the issues, I found a user who configured the database directl
Searching through the issues, I found a user who configured the database directly in Postgres and used `npx drizzle-kit pull` to bring the configurations to the schemas.
- 2
I configured my schemas based on this return and now everything is working. In m
I configured my schemas based on this return and now everything is working. In my case, I needed to create multiple checks and I wasn't able to do it before.
- 3
I believe that a lot has already been resolved, however, the documentation has n
I believe that a lot has already been resolved, however, the documentation has not been updated.
- 4
Note that there is another open issue talking about "depreaction warning on comp
Note that there is another open issue talking about "depreaction warning on composite primary key builder".
Validation
Resolved in drizzle-team/drizzle-orm GitHub issue #3520. Community reactions: 5 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep