0
I have a simple project here, with two models that contain an attribute called phone in both.
class Medico (models.Model):
nome = models.CharField(max_length=50)
endereco = models.CharField(max_length=60)
cpf = models.CharField(unique=True, max_length=11)
telefone = models.CharField(max_length=15)
especialidade = models.ForeignKey(Especialidade, on_delete=models.CASCADE)
def __str__(self):
return self.nome
class Paciente (models.Model):
nome = models.CharField(max_length=50)
endereco = models.CharField(max_length=60)
cpf = models.CharField(unique=True, max_length=11)
telefone = models.CharField(max_length=15)
def __str__(self):
return self.nome
I made the makemigrations and migrate, everything worked as planned, I am using the Mysql like comics.
But for some reason, the countryside telephone is as int in my BD for both the patient table and the medical table, see in the image:
Already the other fields are correct, someone would tell me why this is happening?