我有一个模型类,其中有 4 个字段。当我尝试进行迁移时,它说:
No changes detected
以下是我的模型文件:
models.py
from django.db import models
# Create your models here.
class CarDetail(models.Model):
modelname = models.CharField(max_length=20)
modelimg = models.ImageField(upload_to = 'allcars/')
modelcolor = models.CharField(max_length=11)
modelage = models.IntegerField()
如何将字段迁移到数据库?