drizzle-team / drizzle-team/drizzle-orm

[BUG]: mysql default is not recognized for float type

Open
#5,911 0 comments 0 reactions 0 assignees View on GitHub
bug bug/fixed-in-beta
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

If you have a DEFAULT value in a MySQL float column with a NOT NULL constraint, Drizzle will not introspect the `.default()`.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in drizzle-orm 0.45.2 and drizzle-kit 0.31.10 with a MySQL float column that is NOT NULL and has a DEFAULT value, then trace the schema introspection path. Done means the introspected column preserves and recognizes its .default() value.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.