INSERT failed: NOT NULL constraint failed: ошибка в django и sqlite3
когда я выполняю эту команду в sqlite3:
sqlite> .import af.csv tmpr_product
это дает мне эту ошибку:
af.csv:1: expected 2 columns but found 1 - filling the rest with NULL
af.csv:1: INSERT failed: datatype mismatch
af.csv:2: expected 2 columns but found 1 - filling the rest with NULL
af.csv:2: INSERT failed: NOT NULL constraint failed: tmpr_product.number
af.csv:3: expected 2 columns but found 1 - filling the rest with NULL
af.csv:3: INSERT failed: NOT NULL constraint failed: tmpr_product.number
af.csv:4: expected 2 columns but found 1 - filling the rest with NULL
af.csv:4: INSERT failed: NOT NULL constraint failed: tmpr_product.number
af.csv:5: expected 2 columns but found 1 - filling the rest with NULL
af.csv:5: INSERT failed: NOT NULL constraint failed: tmpr_product.number
af.csv:6: expected 2 columns but found 1 - filling the rest with NULL
af.csv:6: INSERT failed: NOT NULL constraint failed: tmpr_product.number
af.csv:7: expected 2 columns but found 1 - filling the rest with NULL
af.csv:7: INSERT failed: NOT NULL constraint failed: tmpr_product.number
af.csv:8: expected 2 columns but found 1 - filling the rest with NULL
af.csv:8: INSERT failed: NOT NULL constraint failed: tmpr_product.number
af.csv:9: expected 2 columns but found 1 - filling the rest with NULL
af.csv:9: INSERT failed: NOT NULL constraint failed: tmpr_product.number
af.csv:10: expected 2 columns but found 1 - filling the rest with NULL
af.csv:10: INSERT failed: NOT NULL constraint failed: tmpr_product.number
django models:
from django.db import models
# Create your models here.
class product(models.Model):
number=models.CharField( max_length=40)
af.csv:
Как я могу решить эту проблему?
