drizzle-team / drizzle-team/drizzle-orm
[BUG]: drizzle-kit pull for mysql infers boolean as tinyint
- 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.4
### What version of `drizzle-kit` are you using?
0.31.4
### Other packages
_No response_
### Describe the Bug
### What is the undesired behaviour?
Boolean columns are introspected as tinyint column data types and written to `schema.ts` as being a tinyint column
When creating a subsequent migration, even without modifying `schema.ts`, SQL is auto-generated to modify the column to tinyint (because it's currently a boolean at this point)
### What are the steps to reproduce it?
1. Create a non-empty mysql database with boolean column data types
2. Run `npx drizzle-kit pull --host=localhost --port=3306 --user=username --database=database_name --dialect=mysql --out=./src/db/`
3. Run `npx drizzle-kit generate`
### What is the desired result?
Boolean columns are introspected as boolean column data types and written to `schema.ts` as being a boolean column
When creating a subsequent migration, even without modifying `schema.ts`, SQL is not auto-generated to modify the column to tinyint (because it's currently a boolean at this point)
### What database engine are you using? Are you using a specific cloud provider? Which one?
InnoDB on localhost
### Are you working in a monorepo?
No
Contributor guide
Assessment
This issue has not been assessed yet.