Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions drizzle-kit/src/serializer/mysqlSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -949,9 +949,9 @@ export const fromDatabase = async (

const checkConstraints = await db.query(
`SELECT
tc.table_name,
tc.constraint_name,
cc.check_clause
tc.table_name AS TABLE_NAME,
tc.constraint_name AS CONSTRAINT_NAME,
cc.check_clause AS CHECK_CLAUSE
FROM
information_schema.table_constraints tc
JOIN
Expand All @@ -973,7 +973,7 @@ AND
const tableName = checkConstraintRow['TABLE_NAME'];

const tableInResult = result[tableName];
// if (typeof tableInResult === 'undefined') continue;
if (typeof tableInResult === 'undefined') continue;

tableInResult.checkConstraint[constraintName] = {
name: constraintName,
Expand Down