microsoft / microsoft/mssql-django
how can we use varchar instead of nvarchar for models.CharField
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 400
- Forks
- 149
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 19
Description
we have table that uses varchar as datatype, we are trying to use it as foreign key to another table completely created by models.Model
However mssql-django uses nvarchar as data type for models.CharField, which throws an error of non matching data types.
Question :
How to configure mssql-django with MSSQL server to use datatype varchar for models.CharField, or even how to create custom model which will lead to creating varchar datatype for collumn.
thanks in advance
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by tracing how models.CharField is mapped to SQL Server types and reproduce the foreign-key mismatch; done means a documented, tested way to use varchar for the field, or a clear statement that this is unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python, sql
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100