Makemigrations and migrate for already existing database

43 views
Skip to first unread message

Ankita Sharma

unread,
Jun 4, 2021, 8:58:35 AM6/4/21
to Django users
Hello All
Hope all are doing great.
The issue is as follows:
I have already existing 2 MSSql databases from which I have migrated required tables into models.py
Now I am not able to do makemigrations on one of them. Below is the error:

from records.models.transactions_east import AdgSrtransactionsEast
ValueError: source code string cannot contain null bytes

Please help me here

Thanks in advance

Mahendra

unread,
Jun 4, 2021, 9:53:42 AM6/4/21
to django...@googlegroups.com
Check the error in Google 

Mahendra Yadav

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0528c4a7-36a2-4762-a576-db114c7d445cn%40googlegroups.com.

OSA-33 SyCS Atik Rangnekar

unread,
Jun 4, 2021, 10:30:38 AM6/4/21
to django...@googlegroups.com
It think the problem is there is null values/bytes

sourav panja

unread,
Jun 5, 2021, 1:39:56 AM6/5/21
to django...@googlegroups.com
Have you created a new model field ?
Then put on that  null= "True"

Example :: 
Name = Model.CharField(max_legth, null= "True")

Reply all
Reply to author
Forward
0 new messages