Posts

Showing posts with the label psycopg2

Django Error while trying to migrate model on Postgre DB

Django Error while trying to migrate model on Postgre DB I'm still learning to use Django and I have an issue while trying to create a model. Here's my models.py class Identifiants(models.Model): id = models.AutoField(primary_key=True) taxon = models.IntegerField(unique=True) noms = models.TextField(blank=True, null=True) fiche = models.IntegerField(blank=True, null=True) comestible = models.TextField(blank=True, null=True) sms = models.NullBooleanField() a_imprimer = models.NullBooleanField() lieu = models.TextField(blank=True, null=True) apparition = models.TextField() class Meta: managed = True db_table = 'identifiants' The makemigrations command works with no issues but the migrate one is where I have problems Running migrations: Applying app.0001_initial...Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/django/db/backends/utils.py", line 83, in _execute return self.cursor.execute(sql) psycopg2.DataError: NUMERIC precision...