Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] SQL Server does not support JSONFields. #391

Open
Loverz55 opened this issue Apr 28, 2024 · 2 comments
Open

[QUESTION] SQL Server does not support JSONFields. #391

Loverz55 opened this issue Apr 28, 2024 · 2 comments
Labels
question Further information is requested

Comments

@Loverz55
Copy link

use models.JSONField and python manage.py migrate will make Error (fields.E180) SQL Server does not support JSONFields, I want know how to sovle the problem

I see #24 replyed ,But it doesn't seem to solve the problem, so I want know how to sovle the problem

@Loverz55 Loverz55 added the question Further information is requested label Apr 28, 2024
@absci
Copy link
Contributor

absci commented Apr 29, 2024

Hi, could you copy the full error message. Also, what's the mssql-django, SQL Server and OS version?

@bobince
Copy link

bobince commented May 14, 2024

mssql-django's DatabaseWrapper.data_type_check_constraints['JSONField'] contains an ISJSON check. This T-SQL function is only available on SQL Server 2016 and up so if you're running an earlier version you'll get an error when you try to create such a field.

I don't know what the right thing to do is for mssql-django generally. (For us, having a schema that differed depending on mssql version was undesirable so we just unconditionally monkey-patched the constraint out of data_type_check_constraints, but for others the check may be desirable.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants