While shifting database from sql light to cloudcluster, Got the Error- django.db.utils.IntegreityError: (1364,"Field 'name' doesnt have a default value") on running migrations as follows-
ONLY Port engine,database , database password was changed.
python manage.py makemigrations
python manage.py migrate sessions
python manage.py migrate auth
python manage.py migrate migrate
its giving me error -
ProgrammingError at /admin/login/ (1364,"Field 'name' doesnt have a default value")
while my
Models.py code
from django.db import models
from arasdir import settings
# Create your models here.
import django.db.backends.mysql
class category(models.Model):
category_id = models.AutoField(primary_key=True)
category_name=models.CharField(max_length=500)
category_chemical=models.CharField(max_length=10)
category_biological=models.CharField(max_length=10)
def __str__(self):
return self.category_name
class Siginingauthlist(models.Model):
employee_id = models.AutoField(primary_key=True)
employee_name=models.CharField(max_length=500)
department_sign=models.CharField(max_length=10)
sign_designation=models.CharField(max_length=50)
year_validfrom=models.DateField()
year_validthrough=models.DateField()
def __str__(self):
return self.department_sign