drizzle-team / drizzle-team/drizzle-orm

[BUG]: drizzle-kit pull fails silently on MySQL 5.7 because introspection queries information_schema.check_constraints

Open
#5,921 1 comment 0 reactions 0 assignees View on GitHub
bug
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.45.2

### What version of `drizzle-kit` are you using?

0.31.10

### Other packages

_No response_

### Describe the Bug

`drizzle-kit pull` fails on MySQL 5.7.26 even though the database connection is valid and table/column/index introspection succeeds. After local debugging, I found that MySQL introspection queries `information_schema.check_constraints`, but this table does not exist in MySQL 5.7, so the command fails with `ER_UNKNOWN_TABLE: Unknown table 'check_constraints' in information_schema`. The CLI then exits with code `1` without surfacing the real database error, which makes the failure look silent. This seems to be a MySQL 5.7 compatibility issue in `pull`, plus missing error reporting for the underlying query failure.

Contributor guide

Open the contributing guide

Research direction

Start with the drizzle-kit pull MySQL introspection path and reproduce the failure against MySQL 5.7.26, focusing on the query against information_schema.check_constraints and the CLI's error handling. Done means pull either supports MySQL 5.7 without querying the unavailable table or clearly surfaces the underlying ER_UNKNOWN_TABLE error instead of failing silently.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, typescript
Domain
cli, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.