Mixer should respect decimal presision on SQLAlchemy models
- Dominant language
- Python
- Stars
- 953
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
I have model with field defined like this:
`Column(sa.Numeric(precision=9, scale=3), nullable=False)`
and I am trying to use Mixer to put data into that model.
Sometimes it tries to insert larger values than allowed by this field which results with error:
```
sqlalchemy.exc.DataError: Mixer (): (psycopg2.errors.NumericValueOutOfRange) numeric field overflow
DETAIL: A field with precision 9, scale 3 must round to an absolute value less than 10^6.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating Mixer’s SQLAlchemy value-generation path and reproduce the issue with a Numeric(precision=9, scale=3) model. Done means generated values fit the declared precision and scale without causing a numeric field overflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlalchemy
- Domain
- databases, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100