Criei um projeto Python/Django e quando eu gero um migrations com python manage.py makemigrations, ele detecta apenas e campos do meu modelo. Não sei o que possa estar ocorrendo.
models.py
class Pedido(models.Model):
#id = models.IntegerField(primary_key=True),
data_emissao = models.TimeField(null=False),
codigo_smart = models.CharField(max_length=20, null=False),
id_fabricante = models.IntegerField(null=False),
nome_fabricante = models.CharField(max_length=100, null=False),
codigo_cliente = models.CharField(max_length=20, null=False),
nome_cliente = models.CharField(max_length=100, null=False),
cpf_cnpj_cliente = models.CharField(max_length=20, null=False),
cep_cliente = models.CharField(max_length=20, null=False),
endereco_cliente = models.CharField(max_length=200, null=False),
numero_cliente = models.CharField(max_length=20, null=False),
complemento_cliente = models.CharField(max_length=100, null=False),
bairro_cliente = models.CharField(max_length=100, null=False),
cidade_cliente = models.CharField(max_length=100, null=False),
estado_cliente = models.CharField(max_length=100, null=False),
ibge_cliente = models.CharField(max_length=20, null=False),
codigo_transportadora = models.CharField(max_length=10, null=True),
nome_transportadora = models.CharField(max_length=100, null=True),
valor_frete = models.DecimalField(max_digits=15, decimal_places=6, null=False),
total_produtos = models.DecimalField(max_digits=15, decimal_places=6, null=False),
total_pedido = models.DecimalField(max_digits=15, decimal_places=6, null=False),
observacao =models.TextField(null=True),
descontos_total = models.DecimalField(max_digits=15, decimal_places=6, null=False),
id_status = models.IntegerField(null=False),
descricao_status = models.CharField(max_length=100, null=False),
codigo_rastreamento = models.CharField(max_length=50, null=True),
url_pdf_nfe = models.TextField(null=False),
url_xml_nfe = models.TextField(null=False),
forma_pagamento = models.CharField(max_length=100, null=False)
class Meta:
db_table = 'pedido'
Migrations
# Generated by Django 3.2.5 on 2021-07-02 12:15
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Pedido',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('forma_pagamento', models.CharField(max_length=100)),
],
options={
'db_table': 'pedido',
},
),
]