altairbow / django-db-connection-pool

Database connection pool component library for Django
https://pypi.python.org/pypi/django-db-connection-pool/
MIT License
181 stars 24 forks source link

dj_db_conn_pool make migrations #34

Closed ftamy9 closed 1 year ago

ftamy9 commented 2 years ago

Describe the bug There is some problems about dj_db_conn_pool migrations. Some fields are missing.

Environment Python3.8.10 + django 3.2 + Oracle 18C

Traceback My model is :

 class Tbl_Terminal(models.Model):
   id = models.CharField(max_length=8, db_column='id', primary_key=True)
   merchant_id = models.ForeignKey(Tbl_Merchant, related_name="terminal_merchant", on_delete=models.PROTECT)
   type_id = models.ForeignKey(Tbl_Terminal_Type, related_name="terminal_type", on_delete=models.PROTECT)
   serial_no = models.CharField(null=True, max_length=15)
   status = models.IntegerField(choices=TerminalStatus.choices)
   nii = models.PositiveIntegerField(validators=[MaxValueValidator(999)])
   stan = models.PositiveIntegerField(validators=[MaxValueValidator(999999)])
   app_version =models.CharField(max_length=20,null=True,blank=True)
   logon_date = models.DateTimeField(auto_now_add=True,null=True)

After apply migrations, the field logon_date was not created

altairbow commented 2 years ago

check whether the field logon_date exists in migration files