Skip to content

Commit d99bf7c

Browse files
fix: Refine CHECK constraint query in pgSerializer
1 parent ad4ddd4 commit d99bf7c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drizzle-kit/src/serializer/pgSerializer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,8 @@ WHERE
12571257
WHERE
12581258
tc.table_name = '${tableName}'
12591259
AND tc.constraint_schema = '${tableSchema}'
1260-
AND tc.constraint_type = 'CHECK';`);
1260+
AND tc.constraint_type = 'CHECK'
1261+
AND con.contype = 'c';`);
12611262

12621263
columnsCount += tableResponse.length;
12631264
if (progressCallback) {

0 commit comments

Comments
 (0)