I want to update default column value but it seems like default value on columns is is only on the ORM layer, and is not actually setting a default value in the DB and returns error django.db.utils.OperationalError: cannot ALTER TABLE "bps_registration_application" because it has pending trigger events. Is it possible to update default columnn value to 0 in postgress migrations by updating in django model?
This is models.py.
class Application(models.Model):
registration_date = models.CharField(max_length=15)
building_use = models.ForeignKey(to=system_settings.models.BuildingUse)
building_category = models.CharField(max_length=30)
building_structure_category = models.ForeignKey(to=system_settings.models.BuildingStructureCategory)
building_length_ft = models.IntegerField(blank=True, default=0)
building_breadth_ft = models.IntegerField(blank=True, default=0)
building_height_ft = models.IntegerField(blank=True, default=0)
building_length_in = models.IntegerField(blank=True, default=0)
building_breadth_in = models.IntegerField(blank=True, default=0)
building_height_in = models.IntegerField(blank=True, default=0)
building_storey = models.IntegerField(blank=True, default=0)
building_area = models.DecimalField(max_digits=6, decimal_places=2)
reg = models.ForeignKey(NewRegistration)