Django SQLServer [FreeTDS][SQL Server]The data typ

2020-06-23 05:40发布

问题:

I am getting the following error on doing django model.objects.get_or_create.

SQLServer [FreeTDS][SQL Server]The data types nvarchar(max) and ntext are incompatible in the equal to operator.

The column django is complaining about is NVARCHAR(MAX) with null allowed in SQLServer (which was auto created by Django migration). The Django model element is defined as TextField(null=True)