klen / klen/mixer

Value too long for type character varying(24)

Open
#83 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
953
Forks
91
PR merge metrics
No merged PRs in 30d

Description

My test cases getting fail since I switch the test database backend from SQLite to Postgres. I am creating a model instance using mixer and it is throwing the following error.
"Value too long for type character varying(24)"
There is a field where it is showing the error:
code = models.CharField(_('Code'), max_length=24, null=False, blank=False,
db_column='code', default=uuid.uuid4, unique=True)
I am not getting whats wrong with it.
Please help.

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository file or test is named. Start by reproducing the Mixer model creation with PostgreSQL, then trace the generated value against the Django field definition and database schema; done means the fixture is created successfully without exceeding the declared length.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, postgresql, python, sqlite
Domain
databases, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.